ci: Add branch update document strategy (#14083)

pull/14085/head
SWHL 2024-10-24 21:46:59 +08:00 committed by GitHub
parent 0a610f962b
commit c70936cda5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 4 deletions

View File

@ -2,8 +2,7 @@ name: Build/Publish Develop Docs
on:
push:
branches:
- master
- main
- "release/**"
permissions:
contents: write
jobs:
@ -14,7 +13,7 @@ jobs:
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git config user.email github-actions[bot]@users.noreply.github.com
- uses: actions/setup-python@v5
with:
python-version: 3.x
@ -28,4 +27,5 @@ jobs:
- run: pip install mike mkdocs-material jieba mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 mkdocs-static-i18n
- run: |
git fetch origin gh-pages --depth=1
mike deploy --push --update-aliases main latest
VERSION="v"$(${{ github.ref_name }} | cut -d "/" -f2)
mike deploy --push VERSION