-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(chore): Add documentation build workflow for github
- Loading branch information
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |