-
-
Notifications
You must be signed in to change notification settings - Fork 56
54 lines (49 loc) · 1.41 KB
/
build-docs.yml
File metadata and controls
54 lines (49 loc) · 1.41 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Build DOCs
on:
push:
tags:
- '*'
workflow_dispatch: {}
permissions:
contents: write
jobs:
build:
name: build-doc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 1
- uses: actions/checkout@v6
with:
repository: TelegramPlayground/pyrogram
ref: master
path: docs
fetch-depth: 1
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.10"
- 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
cd ./docs/build/html && rm -rf .doctrees && cd ./../../..
- name: Generate GitHub App Token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.ORG_APP_ID }}
private-key: ${{ secrets.ORG_APP_PRIVATE_KEY }}
owner: TelegramPlayground
- uses: peaceiris/actions-gh-pages@v4
with:
personal_token: ${{ steps.generate-token.outputs.token }}
external_repository: TelegramPlayground/pyrogram
publish_dir: ./docs/build/html
publish_branch: gh-pages
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'