Add workflow to deploy to cuicui.github.io #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build & deploy book in next branch | |
on: | |
push: | |
branches: [next] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup mdBook | |
uses: peaceiris/actions-mdbook@v1 | |
with: | |
mdbook-version: "latest" | |
- run: mdbook build the_book/ | |
- name: Deploy to Github pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
personal_token: ${{ secrets.CUICUI_BOOK_DEPLOY_KEY }} | |
external_repository: nicopap/cuicui.github.io | |
destination_dir: next | |
publish_dir: ./the_book/book |