From 68b7b6c818a787872a2596b4ad2011dc7cea2254 Mon Sep 17 00:00:00 2001 From: Jack Yu Date: Thu, 19 Dec 2024 09:46:15 +0800 Subject: [PATCH] feat: use GHA to deploy pages Signed-off-by: Jack Yu --- .github/workflows/deploy.yml | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d7e08013..c7671044 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -5,8 +5,7 @@ on: branches: [main] jobs: - deploy: - name: Deploy to GitHub Pages + build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -18,11 +17,18 @@ jobs: run: | yarn install --frozen-lockfile yarn build - # Popular action to deploy to GitHub Pages: - # Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v3 + - name: Upload static files as artifact + id: deployment + uses: actions/upload-pages-artifact@v3 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - # Build output to publish to the `gh-pages` branch: - publish_dir: ./build \ No newline at end of file + path: ./build + release: + runs-on: ubuntu-latest + permissions: + id-token: write + contents: write + pages: write + needs: build + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} \ No newline at end of file