Pyrofork: Cleanup

Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
wulan17 2024-02-07 20:34:07 +07:00
parent 0bf1d33fa2
commit 9e7166480a
No known key found for this signature in database
GPG key ID: 318CD6CD3A6AC0A5
5 changed files with 38 additions and 26 deletions

View file

@ -6,11 +6,11 @@ body:
label: Checklist
description: Invalid, incomplete or inadequate issue reports may not be taken into consideration
options:
- label: I am sure the error is coming from Pyrogram's code and not elsewhere
- label: I am sure the error is coming from Pyrofork's code and not elsewhere
required: true
- label: I have searched in the issue tracker for similar bug reports, including closed ones
required: true
- label: I ran `pip3 install -U https://github.com/Mayuri-Chan/pyrofork/archive/master.zip` and reproduced the issue using the latest development version
- label: I ran `pip3 install -U git+https://github.com/Mayuri-Chan/pyrofork` and reproduced the issue using the latest development version
required: true
- type: textarea

View file

@ -1,8 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Ask Pyrogram related questions
url: https://stackoverflow.com/questions/tagged/pyrogram
about: This place is only for reporting issues about Pyrogram. You can ask questions at StackOverflow.
- name: Join the Telegram channel
url: https://t.me/pyrogram
about: Join the official channel and stay tuned for news, updates and announcements.
- name: Ask Pyrofork related questions
url: https://stackoverflow.com/questions/tagged/pyrofork
about: This place is only for reporting issues about Pyrofork. You can ask questions at StackOverflow.
- name: Join the Telegram Chat
url: https://t.me/MayuriChan_Chat
about: Join the official Chat and stay tuned for news, updates and announcements.

View file

@ -6,6 +6,7 @@ on:
- "*"
branches:
- staging
- dev/*
jobs:
build:

View file

@ -1,4 +1,4 @@
name: Pyrogram
name: Pyrofork
on: [push, pull_request]

View file

@ -1,31 +1,42 @@
#!/bin/bash
export DOCS_KEY
export VENV=$(pwd)/venv
VENV="$(pwd)"/venv
export VENV
if [[ "$(echo "$GITHUB_REF" | cut -d '/' -f "1 2")" == "refs/tags" ]]; then
branch="main"
elif [[ "$GITHUB_REF" == "refs/heads/staging" ]]; then
branch="staging"
else
b="$(echo "$GITHUB_REF" | cut -d '/' -f '3 4')"
if [[ $(echo "$b" | cut -d '/' -f 1 ) == "dev" ]]; then
b="$(echo "$b" | cut -d '/' -f 2)"
if [[ "$b" =~ ^[0-9]\.[0-9]\.x ]]; then
branch="$b"
else
exit 0
fi
else
exit 0
fi
fi
make clean
make clean-docs
make venv
make api
"$VENV"/bin/pip install -e '.[docs]'
cd compiler/docs && "$VENV"/bin/python compiler.py
cd ../..
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
refs=$(echo "$GITHUB_REF" | cut -d '/' -f "1 2")
if [[ "$refs" == "refs/tags" ]]; then
mkdir -p main
cd main
cd pyrofork-docs || exit 1
mkdir -p "$branch"
cd "$branch" || exit 1
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/* .
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
git commit -a -m "docs: $(echo $GITHUB_REF | cut -d '/' -f 3): Update docs $(date '+%Y-%m-%d | %H:%m:%S %p %Z')" --signoff
git commit -a -m "docs: $branch: Update docs $(date '+%Y-%m-%d | %H:%m:%S %p %Z')" --signoff
git push -u origin --all