1name: Deploy book 2 3on: 4 push: 5 branches: 6 - main 7 8jobs: 9 deploy-book: 10 runs-on: ubuntu-latest 11 steps: 12 - uses: actions/checkout@v3 13 with: 14 persist-credentials: false 15 16 - name: Install stable 17 uses: actions-rs/toolchain@v1 18 with: 19 profile: minimal 20 toolchain: stable 21 override: true 22 23 - name: Test book 24 run: | 25 curl -L https://github.com/rust-lang/mdBook/releases/download/v0.4.5/mdbook-v0.4.5-x86_64-unknown-linux-gnu.tar.gz | tar xz 26 ./mdbook build book 27 ./mdbook test book 28 29 - name: Deploy book 30 uses: JamesIves/github-pages-deploy-action@3.7.1 31 with: 32 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 33 BRANCH: gh-pages 34 FOLDER: book/book 35