Merge pull request #348 from franv314/master #279
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: Docs | |
| on: | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| jobs: | |
| docs: | |
| name: Build documentation | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Install Deps | |
| run: | | |
| sudo apt update | |
| sudo apt install -yy libseccomp-dev libssl-dev build-essential | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: cargo doc | |
| run: cargo doc --color=always --no-deps --all | |
| - name: Make index.html | |
| run: | | |
| echo '<meta http-equiv="Refresh" content="0; url=./task_maker/index.html">' > target/doc/index.html | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: target/doc | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |