Skip to content

Commit

Permalink
Fix docs CI (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
Samoed authored Nov 25, 2024
1 parent 4e1d43f commit c66d97f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/build-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
branches:
- dev
pull_request:
branches:
- dev
workflow_dispatch:

concurrency:
Expand Down Expand Up @@ -37,6 +40,10 @@ jobs:
run: |
poetry install --with docs
- name: Test documentation
run: |
make test-docs
- name: build documentation
run: |
make docs
Expand All @@ -49,15 +56,16 @@ jobs:
BRANCH_NAME=${BRANCH_NAME////_}
echo BRANCH_NAME=${BRANCH_NAME} >> $GITHUB_ENV
- name: save artifact
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ format('github-pages-for-branch-{0}', env.BRANCH_NAME) }}
path: docs/build/
retention-days: 3

- name: deploy website
- name: Deploy to GitHub Pages
uses: JamesIves/[email protected]
if: ${{ github.ref == 'refs/heads/dev' }}
with:
branch: gh-pages
folder: docs/build/html/
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ sync:
.PHONY: docs
docs:
$(poetry) sphinx-apidoc -e -E -f --remove-old -o docs/source/apiref autointent
$(poetry) python -m sphinx build -b html docs/source docs/build/html

.PHONY: test-docs
test-docs: docs
$(poetry) python -m sphinx build -b doctest docs/source docs/build/html

.PHONY: serve-docs
Expand Down

0 comments on commit c66d97f

Please sign in to comment.