From 66510bafd6d2a1ef5354295d81116bd020de361b Mon Sep 17 00:00:00 2001 From: st1020 Date: Tue, 9 Jan 2024 21:51:36 +0800 Subject: [PATCH] chore: update GitHub workflow --- .github/workflows/publish-pages.yml | 30 ++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish-pages.yml b/.github/workflows/publish-pages.yml index cb3e809..ce2d1a1 100644 --- a/.github/workflows/publish-pages.yml +++ b/.github/workflows/publish-pages.yml @@ -7,12 +7,28 @@ on: jobs: build: - name: Publish site runs-on: ubuntu-latest steps: - - name: Checkout main - uses: actions/checkout@v3.0.0 - - name: Build and deploy - uses: shalzz/zola-deploy-action@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v4 + with: + submodules: true + + - name: Upload Pages artifact + uses: st1020/zola-deploy@v1 + + deploy: + needs: build + + permissions: + pages: write + id-token: write + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4