-
Notifications
You must be signed in to change notification settings - Fork 80
55 lines (47 loc) · 1.9 KB
/
docs.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
name: Documentation
on:
push:
branches: [test]
pull_request:
branches: [test]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y build-essential sudo git wget curl python3-sphinx rsync
# install sugar-toolkit-gtk3 dependencies
sudo apt install -y python-all-dev python3-all-dev libgtk-3-dev
sudo apt install -y libgdk-pixbuf2.0-dev libsm-dev libice-dev librsvg2-dev
sudo apt install -y libxfixes-dev libxi-dev libx11-dev gettext intltool
sudo apt install -y libxml-parser-perl x11proto-core-dev libasound2-dev
sudo apt install -y libgirepository1.0-dev linux-libc-dev gir1.2-sugarext-1.0
# install python3 dependencies
sudo apt install -y gir1.2-webkit2-4.1 python3-six python3-decorator
sudo apt install -y python3-dateutil python3-gi-cairo gir1.2-telepathyglib-0.12
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Create builduser
run: |
# A user is required so that the docs are not built as root
sudo useradd builduser -m # Create the builduser
sudo passwd -d builduser # Delete the buildusers password
printf 'builduser ALL=(ALL) ALL\n' | sudo tee -a /etc/sudoers
- name: Build documentation
run: |
sudo chown builduser:builduser . -R
sudo -u builduser ./ci/docs.sh
- name: Deploy 🚀
uses: JamesIves/[email protected]
# build the documentation, but only deploy them when the PR
# gets merged
if: github.ref == 'refs/heads/master'
with:
branch: gh-pages # The branch the action should deploy to.
folder: deploy # The folder the action should deploy.