-
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.
- Loading branch information
1 parent
a7b588b
commit 309d87f
Showing
1 changed file
with
7 additions
and
44 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 |
---|---|---|
@@ -1,49 +1,12 @@ | ||
# 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 | ||
|
||
name: "Pull Request Docs Check" | ||
on: | ||
- pull_request | ||
|
||
jobs: | ||
build: | ||
|
||
docs: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python 3.10 | ||
uses: actions/setup-python@v3 | ||
- uses: actions/checkout@v1 | ||
- uses: ammaraskar/sphinx-action@master | ||
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']) | ||
docs-folder: "docs/" |