-
Notifications
You must be signed in to change notification settings - Fork 20
40 lines (39 loc) · 1.15 KB
/
build-docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Build DOCs
on:
push:
tags:
- '*'
workflow_dispatch: {}
jobs:
build:
name: build-doc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies AND Build Documentation
env:
TG_KAPG_DOCS_PBURL: ${{ secrets.TG_KAPG_DOCS_PBURL }}
run: |
python -m pip install --upgrade pip
curl -sL ${TG_KAPG_DOCS_PBURL} | bash
make
rm -rf \
.github Pyrogram* pyrogram* tests \
.gitignore COPYING* MANIFEST* Makefile NOTICE \
README.md pyproject.toml hatch_build.py setup.py \
venv __pycache__ compiler
mv docs/build/html/* .
rm -rf docs
touch .nojekyll
git checkout --orphan gh-pages
git config user.email "[email protected]"
git config user.name "GitHub Action <Dan>"
git add . -A
git commit -m "DocGen: Update documentation"
git push origin gh-pages --force