Skip to content

Commit 2da1a0b

Browse files
committed
fix(ci): Simplify docs workflow
1 parent 342ec3b commit 2da1a0b

File tree

1 file changed

+12
-21
lines changed

1 file changed

+12
-21
lines changed

.github/workflows/docs.yaml

+12-21
Original file line numberDiff line numberDiff line change
@@ -8,41 +8,32 @@ on:
88
branches:
99
- main
1010

11+
permissions:
12+
contents: write
13+
1114
jobs:
12-
build-docs:
13-
runs-on: ubuntu-latest
14-
steps:
15-
- uses: actions/checkout@v4
16-
- name: Set up Python and dependencies
17-
uses: ./.github/actions/python-deps
18-
with:
19-
pythonVersion: "3.11"
20-
- name: Build documentation
21-
run: mkdocs build
22-
- name: Archive built documentation
23-
uses: actions/upload-artifact@v4
24-
with:
25-
name: docs
26-
path: public/docs
2715
deploy-docs:
2816
runs-on: ubuntu-latest
2917
name: Deploy documentation to GitHub Pages
3018
# publish on 'main' only to prevent version clutter
3119
if: ${{ github.ref == 'refs/heads/main' }}
32-
needs: [build-docs]
3320
steps:
3421
- uses: actions/checkout@v4
3522
- name: Set up Python and dependencies
3623
uses: ./.github/actions/python-deps
3724
with:
3825
pythonVersion: "3.11"
39-
- name: Restore built docs from artifacts
40-
uses: actions/download-artifact@v4
26+
- name: Build pre-release documentation
27+
run: mkdocs build
28+
- name: Archive built documentation
29+
uses: actions/upload-artifact@v4
4130
with:
4231
name: docs
4332
path: public/docs
44-
- name: Publish documentation
33+
- name: Deploy pre-release documentation
34+
if: ${{ github.ref_name == 'main'}}
4535
uses: ./.github/actions/mike-docs
4636
with:
47-
version: ${{ github.event.release.tag_name }}
48-
alias: latest
37+
version: development
38+
pre_release: true # include pre-release notification banner
39+
push: true

0 commit comments

Comments
 (0)