mirror of
https://github.com/ClementTsang/bottom.git
synced 2026-05-04 05:50:42 +00:00
ci: clean up doc CI jobs (#2027)
* remove unnecessary nightly release override * unify to use docs.yml
This commit is contained in:
@@ -6,9 +6,12 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
nightly:
|
version:
|
||||||
description: "Optional nightly redirect override"
|
description: "The version to deploy."
|
||||||
default: ""
|
required: true
|
||||||
|
type: string
|
||||||
|
alias:
|
||||||
|
description: "An optional alias to update."
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
push:
|
push:
|
||||||
@@ -48,11 +51,13 @@ jobs:
|
|||||||
run: ./scripts/ci/configure_git.sh
|
run: ./scripts/ci/configure_git.sh
|
||||||
|
|
||||||
- name: Build and deploy docs with mike
|
- name: Build and deploy docs with mike
|
||||||
env:
|
|
||||||
MKDOCS_NIGHTLY_RELEASE_OVERRIDE: ${{ inputs.nightly || '' }}
|
|
||||||
run: |
|
run: |
|
||||||
cd docs
|
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:
|
publish-gh-pages:
|
||||||
needs: [build-documentation]
|
needs: [build-documentation]
|
||||||
|
|||||||
@@ -161,4 +161,4 @@ jobs:
|
|||||||
uses: ./.github/workflows/docs.yml
|
uses: ./.github/workflows/docs.yml
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
with:
|
with:
|
||||||
nightly: ${{needs.job1.outputs.output1}}
|
version: nightly
|
||||||
|
|||||||
@@ -45,46 +45,15 @@ jobs:
|
|||||||
|
|
||||||
docs:
|
docs:
|
||||||
needs: [initialize]
|
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:
|
permissions:
|
||||||
pages: write
|
pages: write
|
||||||
id-token: write
|
id-token: write
|
||||||
uses: ./.github/workflows/publish_github_pages.yml
|
contents: write
|
||||||
|
uses: ./.github/workflows/docs.yml
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
with:
|
||||||
|
version: ${{ needs.initialize.outputs.version }}
|
||||||
|
alias: "stable"
|
||||||
|
|
||||||
chocolatey:
|
chocolatey:
|
||||||
needs: [initialize]
|
needs: [initialize]
|
||||||
|
|||||||
Reference in New Issue
Block a user