Skip to content

Commit 9d125d1

Browse files
authored
Merge pull request #49 from kraken-tech/docs-in-ci
Test the docs build in CI
2 parents 3271ffa + 2e67686 commit 9d125d1

File tree

5 files changed

+45
-29
lines changed

5 files changed

+45
-29
lines changed

.github/workflows/build_and_publish.yaml

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
- name: check changelog includes version
4242
run: grep '## \[${{ steps.package_version.outputs.version }}\]' < CHANGELOG.md
4343

44-
publish:
44+
pypi:
4545
runs-on: ubuntu-24.04
4646
timeout-minutes: 5
4747

@@ -58,3 +58,31 @@ jobs:
5858
name: Packages
5959
path: dist
6060
- uses: pypa/gh-action-pypi-publish@release/v1
61+
62+
docs:
63+
runs-on: ubuntu-latest
64+
65+
needs: [pypi]
66+
if: github.repository_owner == 'kraken-tech' && github.ref_type == 'tag'
67+
68+
permissions:
69+
contents: write
70+
71+
steps:
72+
- uses: actions/checkout@v5
73+
with:
74+
fetch-depth: 0
75+
- uses: actions/setup-python@v6
76+
with:
77+
python-version-file: '.github/workflows/.python-version'
78+
- name: Install Dependencies
79+
run: |
80+
pip install --group docs
81+
- name: Configure git
82+
run: |
83+
git config --global user.name "GitHub docs action"
84+
git config --global user.email "django-subatomic+docs@example.com"
85+
- name: Build Docs Site
86+
run: |
87+
mike deploy --push --update-aliases ${{ github.event.release.tag_name }} latest
88+
mike set-default latest --push

.github/workflows/tests.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,15 @@ jobs:
4848
FORCE_COLOR: "1"
4949
DEFAULT_DATABASE_URL: postgres://postgres:postgres@localhost/subatomic
5050
OTHER_DATABASE_URL: postgres://postgres:postgres@localhost/subatomic_other
51+
52+
docs:
53+
runs-on: ubuntu-24.04
54+
timeout-minutes: 5
55+
56+
steps:
57+
- uses: actions/checkout@v5
58+
- uses: actions/setup-python@v6
59+
with:
60+
python-version-file: '.github/workflows/.python-version'
61+
- run: pip install --group docs
62+
- run: mkdocs build --strict

.github/workflows/update-dev-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
fetch-depth: 0
1515
- uses: actions/setup-python@v6
1616
with:
17-
python-version: 3.13
17+
python-version-file: '.github/workflows/.python-version'
1818
- name: Install Dependencies
1919
run: |
2020
pip install --group docs

.github/workflows/update-docs.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,6 @@ uv.lock
2525

2626
# Environment variables
2727
.env
28+
29+
# Docs build
30+
site/

0 commit comments

Comments
 (0)