mirror of
https://github.com/ClementTsang/bottom.git
synced 2026-05-03 21:40:32 +00:00
unify to use docs.yml
This commit is contained in:
@@ -5,6 +5,15 @@ name: docs
|
||||
on:
|
||||
workflow_dispatch:
|
||||
workflow_call:
|
||||
inputs:
|
||||
version:
|
||||
description: "The version to deploy."
|
||||
required: true
|
||||
type: string
|
||||
alias:
|
||||
description: "An optional alias to update."
|
||||
required: false
|
||||
type: string
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
@@ -44,7 +53,11 @@ jobs:
|
||||
- name: Build and deploy docs with mike
|
||||
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]
|
||||
|
||||
@@ -160,3 +160,5 @@ jobs:
|
||||
contents: write
|
||||
uses: ./.github/workflows/docs.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
version: nightly
|
||||
|
||||
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user