Skip to content

Update build-docs.yml #2

Update build-docs.yml

Update build-docs.yml #2

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Python application
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# permissions:
# contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
# We add access to system site packages so that projects can save time if they need numpy, pandas, etc.
invoke(['python', '-m', 'venv', '--system-site-packages', 'venv'])
# Do the pseudo-equivalent of ``activate``:
venvBin = os.path.abspath(os.path.join(self.assembly.context.cwd, 'venv', 'bin'))
os.environ['PATH'] = f'{venvBin}:{os.environ["PATH"]}'
# Make sure we have the latest of pip+setuptools+wheel
invoke(['pip', 'install', '--quiet', '--upgrade', 'pip', 'setuptools', 'wheel'])
# #79: ensure that the venv has its own ``sphinx-build``
invoke(['pip', 'install', '--quiet', '--ignore-installed', f'sphinx==3.2.1'])
# Now install the package being rounded up
invoke(['pip', 'install', '--editable', '.[dev]'])
# ☑️ TODO: what other prep steps are there? What about VERSION.txt overwriting?
# python -m pip install --upgrade pip
# pip install -e '.[dev]'
# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Execute docs building
run: |
invoke(['/usr/local/bin/sphinx-build', '-a', '-b', 'html', 'docs/source', 'docs/build'])