1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
# SPDX-FileCopyrightText: 2023 Raphaƫl Doursenaud <rdoursenaud@gmail.com>
#
# SPDX-License-Identifier: CC0-1.0
name: Documentation
on:
pull_request:
branches:
- main
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
jobs:
build-github-pages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version-file: 'pyproject.toml'
cache: 'pip'
- name: Upgrade pip
run: python3 -m pip install --upgrade pip setuptools wheel
- name: Install mido
run: python3 -m pip install --quiet .[build-docs]
- name: Sphinx build
run: sphinx-build -j auto docs docs/_build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/
force_orphan: true
|