-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Publish development documents through github actions. (#954)
Signed-off-by: tao.yang <[email protected]>
- Loading branch information
Showing
1 changed file
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,8 +51,25 @@ jobs: | |
fetch-depth: 0 | ||
ref: ${{ env.REF }} | ||
|
||
- name: Set main branch docs to dev (latest) | ||
id: main_docs | ||
if: ${{ env.REF == 'main' }} | ||
run: | | ||
pip install mkdocs==1.5.2 mike==1.1.2 mkdocs-material==9.2.8 mkdocs-static-i18n==1.0.2 | ||
git config user.email "[email protected]" | ||
git config user.name "robot" | ||
cp ./docs/mkdocs.yml ./ | ||
mike deploy --rebase -b ${{ env.MERGE_BRANCH }} dev -t "dev (${{ env.REF }})" | ||
rm -rf ./site && rm -rf ./mkdocs.yml | ||
git checkout -f ${{ env.MERGE_BRANCH }} | ||
rm -rf ./charts && rm -rf ./index.yaml && rm -rf ./changelogs | ||
tar -czvf ./site.tar.gz * | ||
ls | ||
echo "push document version `dev` from branch ${{ env.REF }}." | ||
- name: Extract Version | ||
id: extract | ||
if: ${{ env.REF != 'main' }} | ||
run: | | ||
if ! grep -E "^[[:space:]]*v[0-9]+.[0-9]+.[0-9]+[[:space:]]*$" VERSION &>/dev/null ; then | ||
echo "not a release version, skip generating doc." | ||
|
@@ -82,7 +99,7 @@ jobs: | |
- name: build doc site | ||
id: build_doc | ||
if: ${{ env.SKIP_ALL_JOB != 'true' }} | ||
if: ${{ env.SKIP_ALL_JOB != 'true' && env.REF != 'main' }} | ||
run: | | ||
git checkout ${{ env.REF }} | ||
ls | ||
|