Skip to content

Use ubuntu for docs workflow #35

Use ubuntu for docs workflow

Use ubuntu for docs workflow #35

Workflow file for this run

name: Documentation
on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
# assume yes and do not ask for confirmation when installing deps using pacman
apt update
apt install -y build-essential sudo git wget curl python3-sphinx rsync
# install sugar-toolkit-gtk3 dependencies
apt install -y python-all-dev python3-all-dev libgtk-3-dev
apt install -y libgdk-pixbuf2.0-dev libsm-dev libice-dev librsvg2-dev
apt install -y libxfixes-dev libxi-dev libx11-dev gettext intltool
apt install -y libxml-parser-perl x11proto-core-dev libasound2-dev
apt install -y libgirepository1.0-dev linux-libc-dev
- 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
useradd builduser -m # Create the builduser
passwd -d builduser # Delete the buildusers password
printf 'builduser ALL=(ALL) ALL\n' | tee -a /etc/sudoers
- name: Build documentation
run: |
sudo chown builduser:builduser . -R
sudo -u builduser ./ci/docs.sh
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@3.7.1
# build the documentation, but only deploy them when the PR
# gets merged
if: github.ref == 'refs/heads/master'
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: deploy # The folder the action should deploy.