From 9d1015915ac5d3859098709a00f3bcf498db338f Mon Sep 17 00:00:00 2001 From: Shrimadhav U K Date: Mon, 1 Jan 2024 20:36:18 +0530 Subject: [PATCH] Bring back Docs, from where it was abandoned :( IABW (#2) * write GHA to generate docs on gh-pages * check * fixes https://github.com/pyrogram/pyrogram/tree/0e68bf35b70901e8d24bebbacf31a1609b18971f --- .github/workflows/build-docs.yml | 30 ++++++++++++++++++++++++++++++ .github/workflows/python.yml | 2 +- Makefile | 3 +++ 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build-docs.yml diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml new file mode 100644 index 000000000..5bd3b9e11 --- /dev/null +++ b/.github/workflows/build-docs.yml @@ -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 "14043624+delivrance@users.noreply.github.com" + git config user.name "GitHub Action " + git add . -A + git commit -m "DocGen: Update documentation" + git push origin gh-pages --force diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index e12233fb2..823c73cbc 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -1,6 +1,6 @@ name: Pyrogram -on: [push, pull_request] +on: [pull_request] jobs: build: diff --git a/Makefile b/Makefile index 930d3be40..159f4d37c 100644 --- a/Makefile +++ b/Makefile @@ -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)