mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +00:00
Pyrofork: docs: Add versioning
Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
parent
d2059ce948
commit
08283fe907
3 changed files with 20 additions and 5 deletions
5
.github/workflows/build-docs.yml
vendored
5
.github/workflows/build-docs.yml
vendored
|
|
@ -2,8 +2,9 @@ name: Build-docs
|
|||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
branches:
|
||||
- main
|
||||
- staging
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
|
|
|||
|
|
@ -12,8 +12,17 @@ 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
|
||||
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
|
||||
if [[ "$GITHUB_REF" == "refs/heads/main" ]]; then
|
||||
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 main
|
||||
cp -r ../docs/build/html/* .
|
||||
mkdir main
|
||||
cp -r ../docs/build/html/* main/
|
||||
else
|
||||
mkdir -p staging
|
||||
cd staging
|
||||
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
|
||||
cp -r ../../docs/build/html/* .
|
||||
fi
|
||||
git config --local user.name "Mayuri-Chan"
|
||||
git config --local user.email "mayuri@mayuri.my.id"
|
||||
git add --all
|
||||
|
|
|
|||
|
|
@ -94,7 +94,12 @@ html_theme_options = {
|
|||
"scheme": "slate"
|
||||
}
|
||||
],
|
||||
"toc_title_is_page_title": True
|
||||
"toc_title_is_page_title": True,
|
||||
"version_dropdown": True,
|
||||
"version_info": [
|
||||
{"version": "main", "title": "main", "aliases": ["latest"]},
|
||||
{"version": "staging", "title": "staging", "aliases": []},
|
||||
],
|
||||
}
|
||||
|
||||
html_logo = "../resources/static/img/pyrogram.png"
|
||||
|
|
|
|||
Loading…
Reference in a new issue