Merge pull request #844 from hermitcore/dependabot/cargo/zerocopy-0.6.3 #432
Workflow file for this run
This file contains 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: | |
- master | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
publish_docs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Rustup (apply rust-toolchain.toml) | |
run: rustup show | |
- name: Install NASM | |
run: | | |
sudo apt-get update | |
sudo apt-get install nasm | |
- name: Generate documentation | |
run: cargo doc --target x86_64-unknown-none --package libhermit-rs | |
- 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://hermitcore.github.io/libhermit-rs/hermit/" /> | |
</head> | |
<body> | |
<p><a href="https://hermitcore.github.io/libhermit-rs/hermit/">Redirect</a></p> | |
</body> | |
</html> | |
EOL | |
- name: Deploy documentation | |
if: success() | |
uses: crazy-max/ghaction-github-pages@v3 | |
with: | |
target_branch: gh-pages | |
build_dir: target/x86_64-unknown-none/doc | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |