Skip to content

Commit

Permalink
Pyrofork: workflows: build main branch docs only on new tags
Browse files Browse the repository at this point in the history
Signed-off-by: wulan17 <[email protected]>
  • Loading branch information
wulan17 committed Dec 30, 2023
1 parent bbb6d40 commit e7c7192
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ name: Build-docs

on:
push:
tags:
- "*"
branches:
- main
- staging

jobs:
Expand Down
3 changes: 2 additions & 1 deletion build-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ cd ../..
"$VENV"/bin/sphinx-build -b html "docs/source" "docs/build/html" -j auto
git clone https://wulan17:"$DOCS_KEY"@github.com/Mayuri-Chan/pyrofork-docs.git
cd pyrofork-docs
if [[ "$GITHUB_REF" == "refs/heads/main" ]]; then
refs=$(echo "$GITHUB_REF" | cut -d '/' -f "1 2")
if [[ "$refs" == "refs/tags" ]]; then
mkdir -p main
cd main
rm -rf _includes api genindex.html intro py-modindex.html sitemap.xml support.html topics _static faq index.html objects.inv searchindex.js start telegram
Expand Down

0 comments on commit e7c7192

Please sign in to comment.