Skip to content

Fix GitHub action for documentation (#48) #2

Fix GitHub action for documentation (#48)

Fix GitHub action for documentation (#48) #2

Workflow file for this run

name: Build documentation
on:
push:
tags:
- "*"
jobs:
test:
name: Build docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
cache: 'pip'
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip setuptools
DEPENDENCIES=$(python -c 'from setuptools.config.setupcfg import read_configuration as c; a = c("setup.cfg"); print(" ".join(a["options"]["install_requires"][1:]))')
pip install ${DEPENDENCIES}
DOCDEPENDENCIES=$(python -c 'with open("docs/requirements.txt") as a: available = list(a); print(" ".join(map(lambda x : x.strip(), filter(lambda x : not x.startswith("#"), available))))')
pip install ${DOCDEPENDENCIES}
- name: Build docs
run: |
touch src/rds2py/rds_parser.py
sphinx-build --color -b html -d docs/doctrees docs docs/_build/html
touch ./docs/_build/html/.nojekyll
- name: GH Pages Deployment
uses: JamesIves/[email protected]
with:
branch: gh-pages # The branch the action should deploy to.
folder: ./docs/_build/html
clean: true # Automatically remove deleted files from the deploy branch