Coursework & QOL Improvements #44
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: Mdbook build | |
| on: | |
| push: | |
| branches: ["main"] | |
| jobs: | |
| build: | |
| name: build | |
| runs-on: ubuntu-latest | |
| env: | |
| MDBOOK_VERSION: '0.4.51' | |
| MDBOOK_LINKCHECK_VERSION: '0.7.7' | |
| MDBOOK_MERMAID_VERSION: '0.15.0' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Install mdbook | |
| run: | | |
| mkdir ~/tools | |
| curl -L -v https://github.com/rust-lang/mdBook/releases/download/v$MDBOOK_VERSION/mdbook-v$MDBOOK_VERSION-x86_64-unknown-linux-gnu.tar.gz | tar xz -C ~/tools | |
| curl -L https://github.com/badboy/mdbook-mermaid/releases/download/v$MDBOOK_MERMAID_VERSION/mdbook-mermaid-v$MDBOOK_MERMAID_VERSION-x86_64-unknown-linux-gnu.tar.gz | tar xz -C ~/tools | |
| curl -L https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases/download/v0.7.7/mdbook-linkcheck.x86_64-unknown-linux-gnu.zip -O | |
| unzip mdbook-linkcheck.x86_64-unknown-linux-gnu.zip -d ~/tools | |
| chmod +x ~/tools/mdbook-linkcheck | |
| curl -s https://api.github.com/repos/zjp-CN/mdbook-theme/releases/latest \ | |
| | grep browser_download_url \ | |
| | grep mdbook-theme_linux \ | |
| | cut -d '"' -f 4 \ | |
| | wget -qi - | |
| tar -xzf mdbook-theme_linux.tar.gz -C ~/tools | |
| echo ~/tools >> "$GITHUB_PATH" | |
| - name: Build | |
| run: mdbook build | |
| # share between different jobs | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: book | |
| path: book/ |