From ba0ff7b1e9d37227a79e3e1430c089b2a84d0ece Mon Sep 17 00:00:00 2001 From: huangjj27 Date: Sun, 28 Apr 2024 16:29:25 +0800 Subject: [PATCH] ci(deployment): migrate to actions/deploy-pages --- .github/workflows/zh-CN.yml | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/.github/workflows/zh-CN.yml b/.github/workflows/zh-CN.yml index 5f84d5e0..2d7443a1 100644 --- a/.github/workflows/zh-CN.yml +++ b/.github/workflows/zh-CN.yml @@ -33,7 +33,7 @@ jobs: - name: Build mdbook run: mdbook build && pwd - name: Cache artifact - uses: actions/upload-artifact@v4 + uses: actions/upload-pages-artifact@v3 with: name: book path: ./book @@ -41,19 +41,12 @@ jobs: deploy: if: github.event_name == 'push' needs: build + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest steps: - - name: Get artifact - uses: actions/download-artifact@v4 - with: - name: book - - name: Deploy - uses: peaceiris/actions-gh-pages@v4 - with: - deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} - publish_dir: ./book/html - publish_branch: gh-pages - allow_empty_commit: true - user_name: "huangjj27" - user_email: "huangjj.27@qq.com" - force_orphan: true + - name: Deploy + id: deployment + uses: peaceiris/actions-gh-pages@v4