Create GitHub Action that publishes docs (#251)
This commit is contained in:
parent
01636f5545
commit
1fab3b02ef
1 changed files with 41 additions and 0 deletions
41
.github/workflows/publish-docs.yml
vendored
Normal file
41
.github/workflows/publish-docs.yml
vendored
Normal file
|
@ -0,0 +1,41 @@
|
|||
name: Publish docs
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
ref:
|
||||
description: 'Git revision'
|
||||
default: 'master'
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
main:
|
||||
name: Main
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: '{{ github.event.inputs.ref }}'
|
||||
# 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
|
||||
run: cd docs && make -j$(nproc)
|
||||
|
||||
- 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
|
Loading…
Add table
Reference in a new issue