Release v1.1.1 #55
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: documentation | |
# Controls when the action will run. | |
on: | |
push: | |
branches: ["**"] | |
pull_request: | |
branches: [main] | |
release: | |
# A release, pre-release, or draft of a release is published. | |
types: [published] | |
# Allows you to run this workflow manually from the Actions tab. | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel. | |
jobs: | |
# The introduction just shows some useful informations. | |
intro: | |
# The type of runner that the job will run on. | |
runs-on: ubuntu-22.04 | |
# Steps represent a sequence of tasks that will be executed as part of the job. | |
steps: | |
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event." | |
- run: echo "The name of the branch is ${{ github.ref }} and the repository is ${{ github.repository }}." | |
# The build job will build the documentation. | |
build: | |
# The type of runner that the job will run on. | |
runs-on: ubuntu-22.04 | |
needs: intro | |
permissions: | |
contents: write | |
# Steps represent a sequence of tasks that will be executed as part of the job. | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
cache: pip | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
cache: npm | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
npm install | |
- name: Sphinx build | |
run: | | |
sphinx-build doc _build --fail-on-warning | |
# Add the .nojekyll file | |
- name: nojekyll | |
if: ${{ github.event_name == 'push' }} | |
run: | | |
touch _build/.nojekyll | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v4 | |
if: ${{ github.event_name == 'release' }} | |
with: | |
publish_branch: gh-pages | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: _build/ | |
force_orphan: true |