From 8f9da7ee5646547b3bb8f56fb836a8b63bb71d28 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Fri, 6 Oct 2023 02:03:58 -0400 Subject: [PATCH] use actions/deploy-pages to deploy to GitHub Pages (#254) Signed-off-by: Jinzhe Zeng --------- Signed-off-by: Jinzhe Zeng --- .github/workflows/push.yaml | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml index 80de2db0..804145e4 100644 --- a/.github/workflows/push.yaml +++ b/.github/workflows/push.yaml @@ -19,12 +19,21 @@ jobs: - run: yarn install - run: yarn build - run: ln -s index.html dist/404.html - - name: Deploy to GitHub Pages - uses: JamesIves/github-pages-deploy-action@releases/v3 - if: github.event_name == 'push' && github.ref == 'refs/heads/master' + - name: Upload Pages artifact + uses: actions/upload-pages-artifact@v2 with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BRANCH: gh-pages - FOLDER: dist - BASE_BRANCH: master - CLEAN: true + path: dist + deploy: + needs: build + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + if: github.event_name == 'push' && github.ref == 'refs/heads/master' + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2