Skip to content

Commit

Permalink
Factor our docs build job into a workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
hackdna committed Oct 18, 2023
1 parent fbb92b5 commit c15cc8f
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 22 deletions.
33 changes: 11 additions & 22 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
# Install Python dependencies and run tests
name: 'Build and test'

name: build

on: push
on:
push:
paths-ignore:
- 'docs/**'
- 'CITATION.cff'
workflow_dispatch:

jobs:
build:
build-and-test:
name: 'Build and test'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-22.04', 'windows-2022', 'macos-12']
steps:
- name: Checkout Forest code from GitHub repo
uses: actions/checkout@v3
- name: Check out Forest code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand All @@ -35,19 +40,3 @@ jobs:
run: python -m unittest tests/imports.py
- name: Run pytest suite
run: pytest
build_docs:
runs-on: ubuntu-22.04
defaults:
run:
working-directory: ./docs
steps:
- name: Checkout Forest code from GitHub repo
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install documentation build dependencies
run: pip install -r requirements.txt
- name: Build the docs
run: make html SPHINXOPTS="-W"
26 changes: 26 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Docs

on:
push:
paths:
- 'docs/**'
workflow_dispatch:

jobs:
build-html-docs:
name: 'Build HTML docs'
runs-on: 'ubuntu-22.04'
defaults:
run:
working-directory: './docs'
steps:
- name: Check out Forest code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Install documentation build dependencies
run: pip install -r requirements.txt
- name: Build HTML docs
run: make html SPHINXOPTS="-W"

0 comments on commit c15cc8f

Please sign in to comment.