Merge pull request #267 from YichiZhang0613/fix_assertion #300
This file contains hidden or 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: Book Publish | |
| #v | |
| on: | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dorny/paths-filter@v2 | |
| id: changes | |
| with: | |
| filters: | | |
| changed: | |
| - 'book/**' | |
| - '.github/workflows/mdbook.yml' | |
| - name: Setup mdBook | |
| uses: peaceiris/actions-mdbook@v1 | |
| if: ${{ steps.changes.outputs.changed == 'true' || startsWith(github.ref, 'refs/tags/') }} | |
| with: | |
| mdbook-version: '0.4.10' | |
| # mdbook-version: 'latest' | |
| - name: mdbook build | |
| if: ${{ steps.changes.outputs.changed == 'true' || startsWith(github.ref, 'refs/tags/') }} | |
| run: | | |
| cd book | |
| mdbook build | |
| cd - | |
| - name: Deploy | |
| uses: peaceiris/actions-gh-pages@v4 | |
| if: ${{ steps.changes.outputs.changed == 'true' || startsWith(github.ref, 'refs/tags/') }} | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./book/book | |