Skip to content

Commit db2aa36

Browse files
committed
2/n
1 parent c604367 commit db2aa36

File tree

1 file changed

+13
-17
lines changed

1 file changed

+13
-17
lines changed

.github/workflows/build-docs.yml

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
tags:
55
- '*'
66
workflow_dispatch: {}
7+
permissions:
8+
contents: write
79
jobs:
810
build:
911
name: build-doc
@@ -21,20 +23,14 @@ jobs:
2123
env:
2224
TG_KAPG_DOCS_PBURL: ${{ secrets.TG_KAPG_DOCS_PBURL }}
2325
run: |
24-
python -m pip install --upgrade pip
25-
curl -sL ${TG_KAPG_DOCS_PBURL} | bash
26-
make
27-
rm -rf \
28-
.github Pyrogram* pyrogram* tests \
29-
.gitignore COPYING* MANIFEST* Makefile NOTICE \
30-
README.md pyproject.toml hatch_build.py setup.py \
31-
venv __pycache__ compiler
32-
mv docs/build/html/* .
33-
rm -rf docs
34-
touch .nojekyll
35-
git checkout --orphan gh-pages
36-
git config user.email "[email protected]"
37-
git config user.name "GitHub Action <Dan>"
38-
git add . -A
39-
git commit -m "DocGen: Update documentation"
40-
git push origin gh-pages --force
26+
python -m pip install --upgrade pip
27+
curl -sL ${TG_KAPG_DOCS_PBURL} | bash
28+
make
29+
30+
- uses: peaceiris/actions-gh-pages@v4
31+
with:
32+
github_token: ${{ secrets.GITHUB_TOKEN }}
33+
publish_dir: ./docs/build/html
34+
publish_branch: gh-pages
35+
user_name: 'github-actions[bot]'
36+
user_email: 'github-actions[bot]@users.noreply.github.com'

0 commit comments

Comments
 (0)