ENH: Bump GitHub Actions versions #22
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: "doc" | |
on: [push, pull_request] | |
permissions: | |
pages: write | |
id-token: write | |
jobs: | |
sphinx-doc: | |
name: "Build HTML Documentation with Sphinx" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11" | |
- name: Update pip | |
run: | | |
python -m pip install --upgrade pip | |
- name: "Install Dependencies" | |
shell: bash | |
run: | | |
python -m pip install flit | |
cd src | |
flit install --deps develop | |
- name: "Build HTML API Documentation" | |
shell: bash | |
run: | | |
sphinx-apidoc -o tmp/apidoc src/itk_dreg --full | |
sed -i -e 's/alabaster/furo/' tmp/apidoc/conf.py | |
sphinx-build tmp/apidoc tmp/html | |
- name: Upload HTML artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: itk-dreg-html-docs | |
path: tmp/html/* | |
- uses: actions/upload-pages-artifact@v2.0.0 | |
with: | |
path: tmp/html | |
deploy: | |
if: github.ref == 'refs/heads/main' | |
needs: | |
- sphinx-doc | |
runs-on: ubuntu-22.04 | |
name: "Deploy HTML Documentation" | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |