Skip to content

Commit

Permalink
Merge pull request #97 from huangjj27/ci-fix-deployment
Browse files Browse the repository at this point in the history
ci(deployment): migrate to actions/deploy-pages
  • Loading branch information
huangjj27 authored Apr 28, 2024
2 parents adc6f66 + ba0ff7b commit 6c5a66c
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 6c5a66c

Please sign in to comment.