mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-04 22:34:52 +00:00
Pyrofork: build-docs.sh: check refs before build docs
Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
parent
8353e5a2a2
commit
afaf158183
1 changed files with 11 additions and 11 deletions
|
|
@ -3,17 +3,7 @@ export DOCS_KEY
|
||||||
VENV="$(pwd)"/venv
|
VENV="$(pwd)"/venv
|
||||||
export VENV
|
export VENV
|
||||||
|
|
||||||
make clean
|
if [[ "$(echo "$GITHUB_REF" | cut -d '/' -f "1 2")" == "refs/tags" ]]; then
|
||||||
make clean-docs
|
|
||||||
make venv
|
|
||||||
make api
|
|
||||||
"$VENV"/bin/pip install -e '.[docs]'
|
|
||||||
cd compiler/docs || exit 1 && "$VENV"/bin/python compiler.py
|
|
||||||
cd ../.. || exit 1
|
|
||||||
"$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
|
|
||||||
refs=$(echo "$GITHUB_REF" | cut -d '/' -f "1 2")
|
|
||||||
if [[ "$refs" == "refs/tags" ]]; then
|
|
||||||
branch="main"
|
branch="main"
|
||||||
elif [[ "$GITHUB_REF" == "refs/heads/staging" ]]; then
|
elif [[ "$GITHUB_REF" == "refs/heads/staging" ]]; then
|
||||||
branch="staging"
|
branch="staging"
|
||||||
|
|
@ -30,6 +20,16 @@ else
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
make clean
|
||||||
|
make clean-docs
|
||||||
|
make venv
|
||||||
|
make api
|
||||||
|
"$VENV"/bin/pip install -e '.[docs]'
|
||||||
|
cd compiler/docs || exit 1 && "$VENV"/bin/python compiler.py
|
||||||
|
cd ../.. || exit 1
|
||||||
|
"$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 || exit 1
|
cd pyrofork-docs || exit 1
|
||||||
mkdir -p "$branch"
|
mkdir -p "$branch"
|
||||||
cd "$branch" || exit 1
|
cd "$branch" || exit 1
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue