prepare release v059 #102
Workflow file for this run
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 Documentation | |
on: | |
workflow_dispatch: | |
push: | |
branches: [main] | |
paths: | |
- tests/* | |
- pyflwdir/* | |
- docs/* | |
- examples/* | |
- pyproject.toml | |
pull_request: | |
branches: [main] | |
paths: | |
- tests/* | |
- pyflwdir/* | |
- docs/* | |
- examples/* | |
- pyproject.toml | |
jobs: | |
# Build docs on Linux | |
test-docs: | |
env: | |
DOC_VERSION: dev | |
PYDEVD_DISABLE_FILE_VALIDATION: 1 | |
timeout-minutes: 30 | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout code | |
uses: actions/checkout@v4 | |
- uses: prefix-dev/setup-pixi@v0.8.1 | |
with: | |
pixi-version: "v0.39.2" | |
environments: default | |
locked: false | |
cache: true | |
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }} | |
# if we're not publishing we don't have to write them, so we might as well | |
# save ourself a bunch of IO time | |
- name: Build dummy docs | |
if: ${{ github.event_name == 'pull_request' }} | |
run: | | |
pixi run docs-dummy | |
- name: Build html docs | |
if: ${{ github.event_name != 'pull_request' }} | |
run: | | |
pixi run docs-html | |
echo "DOC_VERSION=$(pixi run version)" >> $GITHUB_ENV | |
- name: Upload to GitHub Pages | |
if: ${{ github.event_name != 'pull_request'}} | |
uses: peaceiris/actions-gh-pages@v3.8.0 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs/_build/html | |
exclude_assets: '.buildinfo,_sources/*,_examples/*.ipynb' | |
destination_dir: ./${{ env.DOC_VERSION }} | |
keep_files: false | |
full_commit_message: Deploy ${{ env.DOC_VERSION }} to GitHub Pages |