name: rustdoc
on:
push:
branches:
- master
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUSTFLAGS: -D warnings
RUSTUP_MAX_RETRIES: 10
jobs:
rustdoc:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
components: rustfmt, rust-src
- name: Build Documentation
run: cargo doc --all --no-deps
- name: Move Files Checkout
run: |
mkdir -p ./versions/master
mv ./target/doc ./versions/master
git fetch --prune --unshallow
git checkout v0.1.0
- name: Build Documentation v0.1.0
run: cargo doc --all --no-deps
- name: Move Files
run: |
mkdir -p ./versions/v0.1.0
mv ./target/doc ./versions/v0.1.0
- name: Documentation v0.2.1
run: |
mkdir -p ./versions/v0.2.1
git checkout v0.2.1
cargo doc --all --no-deps
mv ./target/doc ./versions/v0.2.1
- name: Documentation v0.2.2
run: |
mkdir -p ./versions/v0.2.2
git checkout 7a3208c76fc2b6d774043764e54620e501997cd6
cargo doc --all --no-deps
mv ./target/doc ./versions/v0.2.2
- name: Deploy Docs
uses: peaceiris/actions-gh-pages@25ae83ba65b483195e2a1b7b9a5198c271d0d84c with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./versions
force_orphan: true