Skip to content

Commit 8f962d4

Browse files
authored
ci: clean up doc CI jobs (#2027)
* remove unnecessary nightly release override * unify to use docs.yml
1 parent 056748b commit 8f962d4

3 files changed

Lines changed: 17 additions & 43 deletions

File tree

.github/workflows/docs.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@ on:
66
workflow_dispatch:
77
workflow_call:
88
inputs:
9-
nightly:
10-
description: "Optional nightly redirect override"
11-
default: ""
9+
version:
10+
description: "The version to deploy."
11+
required: true
12+
type: string
13+
alias:
14+
description: "An optional alias to update."
1215
required: false
1316
type: string
1417
push:
@@ -48,11 +51,13 @@ jobs:
4851
run: ./scripts/ci/configure_git.sh
4952

5053
- name: Build and deploy docs with mike
51-
env:
52-
MKDOCS_NIGHTLY_RELEASE_OVERRIDE: ${{ inputs.nightly || '' }}
5354
run: |
5455
cd docs
55-
mike deploy nightly --push
56+
if [[ -n "${{ inputs.alias }}" ]]; then
57+
mike deploy --push ${{ inputs.version }} --update-aliases ${{ inputs.alias }}
58+
else
59+
mike deploy --push ${{ inputs.version }}
60+
fi
5661
5762
publish-gh-pages:
5863
needs: [build-documentation]

.github/workflows/nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,4 +161,4 @@ jobs:
161161
uses: ./.github/workflows/docs.yml
162162
secrets: inherit
163163
with:
164-
nightly: ${{needs.job1.outputs.output1}}
164+
version: nightly

.github/workflows/post_release.yml

Lines changed: 5 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -45,46 +45,15 @@ jobs:
4545
4646
docs:
4747
needs: [initialize]
48-
runs-on: ubuntu-24.04
49-
permissions:
50-
contents: write
51-
steps:
52-
- name: Set release version
53-
shell: bash
54-
run: |
55-
echo "RELEASE_VERSION=${{ needs.initialize.outputs.version }}" >> $GITHUB_ENV
56-
57-
- name: Validate release version
58-
run: |
59-
echo "Release version: ${{ env.RELEASE_VERSION }}"
60-
61-
- name: Checkout repository
62-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
63-
with:
64-
fetch-depth: 0
65-
66-
- uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
67-
with:
68-
python-version: 3.12
69-
70-
- name: Install Python dependencies
71-
run: pip install -r docs/requirements.txt
72-
73-
- name: Configure git user and email
74-
run: ./scripts/ci/configure_git.sh
75-
76-
- name: Build and deploy docs with mike as the latest stable branch
77-
run: |
78-
cd docs
79-
mike deploy --push --update-aliases ${RELEASE_VERSION} stable
80-
81-
publish-gh-pages:
82-
needs: [docs]
8348
permissions:
8449
pages: write
8550
id-token: write
86-
uses: ./.github/workflows/publish_github_pages.yml
51+
contents: write
52+
uses: ./.github/workflows/docs.yml
8753
secrets: inherit
54+
with:
55+
version: ${{ needs.initialize.outputs.version }}
56+
alias: "stable"
8857

8958
chocolatey:
9059
needs: [initialize]

0 commit comments

Comments
 (0)