ladderz/.github/workflows/deploy-docs.yml
2023-09-19 00:21:15 -04:00

32 lines
918 B
YAML

name: Deploy Documentation
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust (Stable)
run: curl https://sh.rustup.rs -sSf | sh -s -- -y
- name: Build Documentation
run: |
cd ladderz
cargo doc
rm -rf ./docs
echo '<meta http-equiv="refresh" content="0; url=https://rzmk.github.io/ladderz/ladderz/index.html" />' > ./target/doc/index.html
cp -r ./target/doc ./docs
cd ..
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./ladderz/target/doc