From 4c42f3b9481a4a623755b2092151f9c75280a944 Mon Sep 17 00:00:00 2001 From: UmmIt <git@ummit.dev> Date: Mon, 25 Nov 2024 14:56:04 +0800 Subject: [PATCH] test(ci): update GitHub Pages workflow for Docusaurus --- .github/workflows/deploy.yml | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f228978..06d3a63 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -5,12 +5,17 @@ on: branches: [master] workflow_dispatch: +permissions: + contents: write + pages: write + id-token: write + jobs: - build: + deploy: runs-on: ubuntu-latest steps: - - name: Checkout Repository + - name: Checkout repository uses: actions/checkout@v3 - name: Set up Node.js @@ -19,14 +24,20 @@ jobs: node-version: 20 cache: 'yarn' - - name: Install Dependencies + - name: Install dependencies run: yarn install - - name: Build Website + - name: Build website run: yarn build - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v4 + - name: Configure Pages + uses: actions/configure-pages@v4 + + - name: Upload artifact + uses: actions/upload-pages-artifact@v4 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: build + path: build + + - name: Deploy to GitHub Pages + uses: actions/deploy-pages@v4 +