diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 15d23219..a4d79f43 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -6,9 +6,12 @@ on: workflow_dispatch: workflow_call: inputs: - nightly: - description: "Optional nightly redirect override" - default: "" + version: + description: "The version to deploy." + required: true + type: string + alias: + description: "An optional alias to update." required: false type: string push: @@ -48,11 +51,13 @@ jobs: run: ./scripts/ci/configure_git.sh - name: Build and deploy docs with mike - env: - MKDOCS_NIGHTLY_RELEASE_OVERRIDE: ${{ inputs.nightly || '' }} run: | cd docs - mike deploy nightly --push + if [[ -n "${{ inputs.alias }}" ]]; then + mike deploy --push ${{ inputs.version }} --update-aliases ${{ inputs.alias }} + else + mike deploy --push ${{ inputs.version }} + fi publish-gh-pages: needs: [build-documentation] diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 821f2c03..729f8d50 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -161,4 +161,4 @@ jobs: uses: ./.github/workflows/docs.yml secrets: inherit with: - nightly: ${{needs.job1.outputs.output1}} + version: nightly diff --git a/.github/workflows/post_release.yml b/.github/workflows/post_release.yml index 28967933..adf8013c 100644 --- a/.github/workflows/post_release.yml +++ b/.github/workflows/post_release.yml @@ -45,46 +45,15 @@ jobs: docs: needs: [initialize] - runs-on: ubuntu-24.04 - permissions: - contents: write - steps: - - name: Set release version - shell: bash - run: | - echo "RELEASE_VERSION=${{ needs.initialize.outputs.version }}" >> $GITHUB_ENV - - - name: Validate release version - run: | - echo "Release version: ${{ env.RELEASE_VERSION }}" - - - name: Checkout repository - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - with: - fetch-depth: 0 - - - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 - with: - python-version: 3.12 - - - name: Install Python dependencies - run: pip install -r docs/requirements.txt - - - name: Configure git user and email - run: ./scripts/ci/configure_git.sh - - - name: Build and deploy docs with mike as the latest stable branch - run: | - cd docs - mike deploy --push --update-aliases ${RELEASE_VERSION} stable - - publish-gh-pages: - needs: [docs] permissions: pages: write id-token: write - uses: ./.github/workflows/publish_github_pages.yml + contents: write + uses: ./.github/workflows/docs.yml secrets: inherit + with: + version: ${{ needs.initialize.outputs.version }} + alias: "stable" chocolatey: needs: [initialize]