ci: Add branch update document strategy (#14083)
parent
0a610f962b
commit
c70936cda5
|
@ -2,8 +2,7 @@ name: Build/Publish Develop Docs
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- "release/**"
|
||||||
- main
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
jobs:
|
jobs:
|
||||||
|
@ -14,7 +13,7 @@ jobs:
|
||||||
- name: Configure Git Credentials
|
- name: Configure Git Credentials
|
||||||
run: |
|
run: |
|
||||||
git config user.name github-actions[bot]
|
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
|
- uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: 3.x
|
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: pip install mike mkdocs-material jieba mkdocs-git-revision-date-localized-plugin mkdocs-git-committers-plugin-2 mkdocs-static-i18n
|
||||||
- run: |
|
- run: |
|
||||||
git fetch origin gh-pages --depth=1
|
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