@@ -10,27 +10,24 @@ jobs:
1010 runs-on : ubuntu-latest
1111 needs : [checks]
1212 steps :
13- - uses : actions/checkout@v4
13+ - uses : actions/checkout@v4
1414
15- - name : Install uv
16- uses : astral-sh/setup-uv@v3
15+ - name : Install uv
16+ uses : astral-sh/setup-uv@v3
17+ with :
18+ enable-cache : true
1719
18- - name : " Set up Python"
19- uses : actions/setup-python@v5
20- with :
21- python-version-file : " .python-version"
20+ - name : Set up Python 3.12
21+ run : uv python install 3.12
2222
23- - name : Install the project
24- run : uv sync --frozen --all-extras --dev
23+ - name : Build
24+ run : uv build
2525
26- - name : Build
27- run : uv build
28-
29- - name : Upload artifacts
30- uses : actions/upload-artifact@v4
31- with :
32- name : release-dists
33- path : dist/
26+ - name : Upload artifacts
27+ uses : actions/upload-artifact@v4
28+ with :
29+ name : release-dists
30+ path : dist/
3431
3532 checks :
3633 uses : ./.github/workflows/shared.yml
@@ -42,14 +39,42 @@ jobs:
4239 needs :
4340 - release-build
4441 permissions :
45- id-token : write # IMPORTANT: this permission is mandatory for trusted publishing
42+ id-token : write # IMPORTANT: this permission is mandatory for trusted publishing
4643
4744 steps :
48- - name : Retrieve release distributions
49- uses : actions/download-artifact@v4
50- with :
51- name : release-dists
52- path : dist/
53-
54- - name : Publish package distributions to PyPI
55- uses : pypa/gh-action-pypi-publish@release/v1
45+ - name : Retrieve release distributions
46+ uses : actions/download-artifact@v4
47+ with :
48+ name : release-dists
49+ path : dist/
50+
51+ - name : Publish package distributions to PyPI
52+ uses : pypa/gh-action-pypi-publish@release/v1
53+
54+ docs-publish :
55+ runs-on : ubuntu-latest
56+ needs : ["pypi-publish"]
57+ permissions :
58+ contents : write
59+ steps :
60+ - uses : actions/checkout@v4
61+ - name : Configure Git Credentials
62+ run : |
63+ git config user.name github-actions[bot]
64+ git config user.email 41898282+github-actions[bot]@users.noreply.github.com
65+
66+ - name : Install uv
67+ uses : astral-sh/setup-uv@v3
68+ with :
69+ enable-cache : true
70+
71+ - run : echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
72+ - uses : actions/cache@v4
73+ with :
74+ key : mkdocs-material-${{ env.cache_id }}
75+ path : .cache
76+ restore-keys : |
77+ mkdocs-material-
78+
79+ - run : uv sync --frozen --group docs
80+ - run : uv run --no-sync mkdocs gh-deploy --force
0 commit comments