Skip to content

Commit

Permalink
Publish development documents through github actions. (#954)
Browse files Browse the repository at this point in the history
Signed-off-by: tao.yang <[email protected]>
  • Loading branch information
ty-dc authored Nov 8, 2023
1 parent 85a0dc5 commit 429fedf
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/call-release-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 429fedf

Please sign in to comment.