Skip to content

Fixed release workflows (#416) #4

Fixed release workflows (#416)

Fixed release workflows (#416) #4

Workflow file for this run

name: docs-release
on:
push:
branches: ['master']
paths:
- 'docs/**' # Trigger when files inside docs folder are changed
tags:
- 'v*' # only release a versioned tag, such as v.X.Y.Z
pull_request:
paths:
- 'docs/**' # Trigger when docs are changed within a pull request
workflow_dispatch: # Allow manual triggering of the workflow
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox
- name: Build docs
working-directory: ./python
run: tox -e build-docs
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: html-docs
path: docs/_build/html/
- name: Deploy 🚀
uses: peaceiris/actions-gh-pages@v3
# Deploy to the gh-pages branch when a tag is pushed or the workflow is manually triggered
if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html