diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index ef4c8db6..b56e43b9 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -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 diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 453151d8..f011af1a 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -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. \ No newline at end of file + - 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. \ No newline at end of file diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 1c822799..885f8ccd 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -6,6 +6,7 @@ on: - "*" branches: - staging + - dev/* jobs: build: diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index f65018ca..556c2f16 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -1,4 +1,4 @@ -name: Pyrogram +name: Pyrofork on: [push, pull_request] diff --git a/build-docs.sh b/build-docs.sh index 26c6196e..6bdcf148 100644 --- a/build-docs.sh +++ b/build-docs.sh @@ -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 - 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 +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/* . 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