From 36db24e08b98e11554ae5853d90add97cf71c403 Mon Sep 17 00:00:00 2001 From: K Date: Thu, 24 Oct 2024 15:34:37 +0800 Subject: [PATCH] update workflow --- .github/workflows/publish.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 09685cc..4285255 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -5,19 +5,28 @@ on: branches: - master +permissions: + contents: read + pages: write + id-token: write + jobs: deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - uses: actions/setup-node@v2.1.2 - run: yarn - name: Build run: yarn build - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 + - name: Setup Pages + uses: actions/configure-pages@v5 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./docs/.vitepress/dist + path: './docs/.vitepress/dist' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4