Update mdbook, and make it easier in the future #11
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
| env: | |
| cname: translating.ankiweb.net | |
| name: github pages | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - test | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - name: Cache binaries | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/bin | |
| key: ${{ runner.os }}-bin-${{ hashFiles('.github/workflows/build.sh') }} | |
| restore-keys: | | |
| ${{ runner.os }}-bin- | |
| - name: Build | |
| run: .github/workflows/build.sh | |
| - name: Deploy | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./book/html | |
| cname: ${{ env.cname }} | |
| check: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - name: Cache binaries | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo/bin | |
| key: ${{ runner.os }}-bin-${{ hashFiles('.github/workflows/build.sh') }} | |
| restore-keys: | | |
| ${{ runner.os }}-bin- | |
| - name: Build | |
| run: CHECK=1 .github/workflows/build.sh |