Merge pull request #25 from ZeusWPI/github-actions

GitHub actions for documentation
This commit is contained in:
redfast00 2022-01-18 15:21:33 +01:00 committed by GitHub
commit 2e7681edcd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 33 additions and 0 deletions

4
.github/workflows/install_docs_deps.sh vendored Executable file
View file

@ -0,0 +1,4 @@
#!/bin/bash -e
sudo apt update
sudo sudo apt install -y pandoc python3 texlive-full

29
.github/workflows/moduledocs.yml vendored Normal file
View file

@ -0,0 +1,29 @@
name: Module documentation
on: [push, pull_request]
jobs:
moduledocs:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
- uses: actions/cache@v2
id: cache-id
with:
path: ${{ runner.temp }}/cache-docs
key: ${{ runner.os }}-cache-build-docs-key-v1.0
- uses: airvzxf/cache-anything-new-action@60f610a30a315bf6b4dca9d4c5c2abc501d95d65
with:
script: 'install_docs_deps.sh'
is_cached: ${{ steps.cache-id.outputs.cache-hit }}
cache: ${{ runner.temp }}/cache-docs
snapshot: '/'
exclude: '/boot /data /dev /mnt /proc /run /sys'
- name: Compile documentation
run: |
cd ${{ github.workspace }}/docs
python3 build.py
- name: Archive documentation as artifact
uses: actions/upload-artifact@v2
with:
name: moduledocs
path: ${{github.workspace}}/docs/docs.pdf