Skip to content

Commit 774eb98

Browse files
committed
unify to use docs.yml
1 parent 969226f commit 774eb98

3 files changed

Lines changed: 21 additions & 37 deletions

File tree

.github/workflows/docs.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ name: docs
55
on:
66
workflow_dispatch:
77
workflow_call:
8+
inputs:
9+
version:
10+
description: "The version to deploy."
11+
required: true
12+
type: string
13+
alias:
14+
description: "An optional alias to update."
15+
required: false
16+
type: string
817
push:
918
branches:
1019
- main
@@ -44,7 +53,11 @@ jobs:
4453
- name: Build and deploy docs with mike
4554
run: |
4655
cd docs
47-
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
4861
4962
publish-gh-pages:
5063
needs: [build-documentation]

.github/workflows/nightly.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,3 +160,5 @@ jobs:
160160
contents: write
161161
uses: ./.github/workflows/docs.yml
162162
secrets: inherit
163+
with:
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)