2021-01-07 17:08:52 +13:00
|
|
|
name: Publish docs
|
|
|
|
|
|
|
|
on:
|
2021-01-09 19:19:51 +13:00
|
|
|
release:
|
|
|
|
types: [published]
|
|
|
|
|
2021-01-07 17:08:52 +13:00
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
ref:
|
|
|
|
description: 'Git revision'
|
2021-09-11 20:30:35 +10:00
|
|
|
default: 'main'
|
2021-01-07 17:08:52 +13:00
|
|
|
required: true
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
main:
|
|
|
|
name: Main
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- name: Check out repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
2021-01-07 17:12:56 +13:00
|
|
|
ref: '${{ github.event.inputs.ref }}'
|
2021-01-07 17:08:52 +13:00
|
|
|
# Documentation build uses `git describe` which requires history
|
|
|
|
fetch-depth: 0
|
|
|
|
|
|
|
|
- name: Install Rust
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: nightly
|
|
|
|
profile: minimal
|
|
|
|
override: true
|
|
|
|
|
|
|
|
- name: Build documentation
|
2021-09-20 20:37:44 +10:00
|
|
|
run: cd docs && make -j$(nproc)
|
2021-01-07 17:08:52 +13:00
|
|
|
|
|
|
|
- name: Deploy
|
|
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
publish_dir: docs/site
|
|
|
|
cname: maud.lambda.xyz
|
|
|
|
force_orphan: true
|