ci(docs): add workflow to publish docs
This commit is contained in:
parent
33dbf2c35a
commit
0a2d91fc68
1 changed files with 35 additions and 0 deletions
35
.github/workflows/docs.yaml
vendored
Normal file
35
.github/workflows/docs.yaml
vendored
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
name: Documentation
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- dev
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docs:
|
||||||
|
name: Documentation
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: mamba-org/setup-micromamba@v1
|
||||||
|
with:
|
||||||
|
environment-name: ci
|
||||||
|
environment-file: environment.yaml
|
||||||
|
init-shell: bash
|
||||||
|
cache-environment: true
|
||||||
|
post-cleanup: 'all'
|
||||||
|
- name: Build Python package
|
||||||
|
run: maturin develop --release --manifest-path pyargus/Cargo.toml
|
||||||
|
- name: Build HTML docs
|
||||||
|
run: sphinx-build -b html docs docs/_build/${{ github.ref_name }}
|
||||||
|
- name: Deploy
|
||||||
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
|
if: github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/')
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
publish_dir: docs/build/
|
||||||
|
destination_dir: ${{ github.ref_name }}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue