Skip to content

chore: make sure python package is installed before docs build #119

chore: make sure python package is installed before docs build

chore: make sure python package is installed before docs build #119

Workflow file for this run

name: Documentation
on: [ push, pull_request, workflow_dispatch ]
permissions:
contents: write
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.10", "3.11", "3.12" ]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: '**/pyproject.toml'
- name: Install hatch
run: |
pip install hatch
- name: Run tests
run: |
hatch run pytest
docs:
runs-on: ubuntu-latest
# needs: [test]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install hatch
run: |
pip install hatch
- name: Sphinx build
env:
SPHINX_GITHUB_CHANGELOG_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
hatch run docs:sphinx-build docs _build
- name: Deploy to GitHub Pages
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: _build/
force_orphan: true
cname: falco.oluwatobi.dev