ci: Add branch update document strategy (#14083)
parent
0a610f962b
commit
c70936cda5
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue