Skip to content

Commit

Permalink
ci(deployment): migrate to actions/deploy-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
huangjj27 committed Apr 28, 2024
1 parent 728a81b commit ba0ff7b
Showing 1 changed file with 8 additions and 15 deletions.
23 changes: 8 additions & 15 deletions .github/workflows/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,20 @@ 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

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: "[email protected]"
force_orphan: true
- name: Deploy
id: deployment
uses: peaceiris/actions-gh-pages@v4

0 comments on commit ba0ff7b

Please sign in to comment.