name: Deploy development docs preview
on:
push:
branches:
- v0.1
- v0.2
permissions:
contents: write
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10
RUST_BACKTRACE: short
jobs:
build:
name: Build docs
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install beta toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: beta
profile: minimal
override: true
- name: Build docs
uses: actions-rs/cargo@v1
with:
command: doc
args: --no-deps
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: target/doc
target-folder: ${{ github.ref_name }}