Merge pull request #2182 from hermit-os/dependabot/cargo/thiserror-2.… #1434
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: Publish Docs | |
| on: | |
| push: | |
| branches: | |
| - main | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| publish_docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - uses: mkroening/rust-toolchain-toml@main | |
| - run: rustup target add x86_64-unknown-none | |
| - name: Generate documentation | |
| run: cargo doc --target x86_64-unknown-none --package hermit-kernel | |
| - name: Generate index.html | |
| run: | | |
| cat > target/x86_64-unknown-none/doc/index.html <<EOL | |
| <!doctype html> | |
| <html> | |
| <head> | |
| <title>Redirect!</title> | |
| <meta http-equiv="refresh" content="0; url=https://hermit-os.github.io/kernel/hermit/" /> | |
| </head> | |
| <body> | |
| <p><a href="https://hermit-os.github.io/kernel/hermit/">Redirect</a></p> | |
| </body> | |
| </html> | |
| EOL | |
| - name: Deploy documentation | |
| if: success() | |
| uses: crazy-max/ghaction-github-pages@v4 | |
| with: | |
| target_branch: gh-pages | |
| build_dir: target/x86_64-unknown-none/doc | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |