name: Deploy Cargo Docs
on:
push:
branches:
- main
jobs:
release:
name: GitHub Pages
runs-on: ubuntu-latest
environment: production
steps:
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ steps.extract_branch.outputs.branch }}
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
components: rustfmt, rust-src
- name: Publish Documentation
uses: actions-rs/cargo@v1
with:
command: publish
args: --token ${{ secrets.CARGO_REGISTRY_TOKEN }}