From 953618bffbb7ae2f2d3e1b554f1d08e7cface8be Mon Sep 17 00:00:00 2001 From: Joshua Fernandes Date: Wed, 24 Jan 2024 12:59:53 +1000 Subject: [PATCH] Revert "Now that hosting is in vercel, we can remove redundant github pages actions" (#1484) Signed-off-by: Joshua Fernandes --- .github/workflows/publish-main-docs.yml | 36 +++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/publish-main-docs.yml diff --git a/.github/workflows/publish-main-docs.yml b/.github/workflows/publish-main-docs.yml new file mode 100644 index 00000000000..4b8cedd929b --- /dev/null +++ b/.github/workflows/publish-main-docs.yml @@ -0,0 +1,36 @@ +name: Publish main branch docs to GitHub Pages +# NOTE that we publish `main` to github pages branch: gh-pages +# and previews only are handled by vercel + +on: + push: + branches: main + +jobs: + publish-docs-to-gh-pages: + name: Publish docs to `./` directory of `gh-pages` branch + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Checkout the repository + uses: actions/checkout@v3 + + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: 'yarn' + + - name: Install npm dependencies + run: yarn --immutable + + - name: Run build script + run: yarn build + + - name: Deploy to `./` directory of `gh-pages` branch + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./build + keep_files: true