Skip to content

Commit

Permalink
(chore): Add documentation build workflow for github
Browse files Browse the repository at this point in the history
  • Loading branch information
tomjanus committed Aug 6, 2024
1 parent f316c7b commit ce96ba1
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: "GeoCARET Build"

on: [push, pull_request, workflow_dispatch]

env:
# Only build on Python 3.8+
CIBW_BUILD: cp38-* cp39-* cp310-*
SERVICEACCOUNT: ${{ secrets.SERVICEACCOUNT }}
SERVICEACCOUNT_EMAIL: ${{ secrets.SERVICEACCOUNT_EMAIL }}

permissions:
contents: write

jobs:

build_docs:
name: Build documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # This is required for setuptools_scm: https://github.com/pypa/setuptools_scm/issues/480

- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.11'

- name: Build docs
# lpsolve doesn't compile on Ubuntu without building the library from source - disable for the time being.
# This doesn't really matter for the documentation builds.
run: |
sudo apt install --no-install-recommends pandoc
pip install --upgrade pip
pip install -e .
pip install -r requirements_doc.txt
pip install https://github.com/SuperKogito/sphinxcontrib-pdfembed/archive/master.zip
cd docs
make html
- name: Deploy docs 🚀
uses: JamesIves/github-pages-deploy-action@3.7.1
# Only publish on master
if: github.ref == 'refs/heads/master'
with:
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: docs/_build/html # The folder the action should deploy.
CLEAN: true # Automatically remove deleted files from the deploy branc

0 comments on commit ce96ba1

Please sign in to comment.