Skip to content

Commit

Permalink
Bring back Docs, from where it was abandoned :( IABW (#2)
Browse files Browse the repository at this point in the history
* write GHA to generate docs on gh-pages

* check

* fixes

https://github.com/pyrogram/pyrogram/tree/0e68bf35b70901e8d24bebbacf31a1609b18971f
  • Loading branch information
SpEcHiDe authored Jan 1, 2024
1 parent be320ea commit 9d10159
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build DOCs
on: [workflow_dispatch, push]
jobs:
build:
name: build-doc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.9'

- name: Install dependencies
run: |
make
rm -rf .github compiler Pyrogram* pyrogram* tests .gitignore COPYING*
rm -f MANIFEST* Makefile NOTICE README.md *requirements.txt
rm -f setup.py tox.ini
mv docs/build/html/* .
rm -rf docs venv
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
2 changes: 1 addition & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Pyrogram

on: [push, pull_request]
on: [pull_request]

jobs:
build:
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ RM := rm -rf

.PHONY: venv clean-build clean-api clean api build

all: clean venv build docs
echo Done

venv:
$(RM) $(VENV)
python3 -m venv $(VENV)
Expand Down

0 comments on commit 9d10159

Please sign in to comment.