Skip to content

Commit

Permalink
chore: make sure python package is installed before docs build
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobi-De committed Mar 20, 2024
1 parent 2e4676c commit f7caa46
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 3 deletions.
28 changes: 26 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: Documentation

on: [ push, pull_request, workflow_dispatch ]

Expand Down Expand Up @@ -27,4 +27,28 @@ jobs:
- 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
5 changes: 4 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,7 @@ sphinx:
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: docs/requirements.txt
- requirements: docs/requirements.txt
# Install our python package before building the docs
- method: pip
path: .

0 comments on commit f7caa46

Please sign in to comment.