File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,6 +5,15 @@ name: docs
55on :
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
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]
Original file line number Diff line number Diff line change @@ -160,3 +160,5 @@ jobs:
160160 contents : write
161161 uses : ./.github/workflows/docs.yml
162162 secrets : inherit
163+ with :
164+ version : nightly
Original file line number Diff line number Diff 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]
You can’t perform that action at this time.
0 commit comments