-
Notifications
You must be signed in to change notification settings - Fork 89
79 lines (75 loc) · 2.27 KB
/
deploy_doc_l10n.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Update docs and translatable strings
on:
push:
branches:
- main
jobs:
strings:
name: Upload translatable strings
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
sudo apt-get update -q
sudo apt-get install -qy jq
pip install -e .[babel]
- name: Extract
run: python setup.py extract_messages
- name: Upload
env:
poeditor_api_token: ${{ secrets.POEDITOR_API_TOKEN }}
run: ./scripts/poedit.sh upload
build:
name: Generate docs
needs: strings
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
sudo apt-get update -q
sudo apt-get install -qy jq gobject-introspection libgirepository-1.0-1 gir1.2-gtk-3.0 gir1.2-glib-2.0 gir1.2-gstreamer-1.0 gir1.2-poppler-0.18 python3-pip python3-setuptools python3-wheel libgirepository1.0-dev vlc
pip install pygobject pycairo .[build_sphinx] .[vlc_video]
- name: Build
env:
poeditor_api_token: ${{ secrets.POEDITOR_API_TOKEN }}
run: |
./scripts/poedit.sh contributors
python3 -m sphinx -bhtml docs/ build/sphinx/html -t api_doc -t install_instructions
tar czf pympress-docs.tar.gz -C build/sphinx/html/ .
- name: Upload
uses: actions/upload-artifact@v3
with:
name: pympress-docs.tar.gz
path: pympress-docs.tar.gz
deploy:
name: Deploy docs
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
repository: pympress/pympress.github.io
token: ${{ secrets.GITHUB_PERSONAL_ACCESS_TOKEN }}
ref: main
- name: Download
uses: actions/download-artifact@v3
with:
name: pympress-docs.tar.gz
path: .
- name: Extract and push
run: |
tar xzf pympress-docs.tar.gz
rm pympress-docs.tar.gz
git add .
git -c user.email=me@cimba.li -c user.name="${GITHUB_ACTOR}" commit -m "Github Action-built docs update"
git push