Update repository documentation files (#865) #1022
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and publish documentation | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Install quartodoc and griffe | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install quartodoc==0.6.1 | |
- name: Set up Quarto | |
uses: quarto-dev/quarto-actions/setup@v2 | |
with: | |
version: 1.5.57 # since this is my local version, we could change it | |
- name: Build docs | |
shell: bash | |
run: | | |
python -m quartodoc build --config docs/_quarto.yml | |
quarto render docs | |
touch docs/_site/.nojekyll | |
- name: Publish to GitHub | |
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags') # Only from main or a tag | |
uses: quarto-dev/quarto-actions/publish@v2 | |
with: | |
target: gh-pages | |
render: false | |
path: docs/_site | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |