Skip to content

Commit

Permalink
Add CI check for downstream doc building (#4)
Browse files Browse the repository at this point in the history
* Add CI check for downstream doc building

* we don't need to test python 3.9 or on windows IMHO

* bump ci

* test dirs

* forgot to include other repo

* messed up path to env

* need env name since we don't have one in yaml

* move path debugging before we try and install env

* yaml not yml (thanks windows)

* just use what is in our doc env like RTD does, also don't need a matrix

* it would be best to not do a dev install since we don't on RTD

* make sure we remove the version we installed from the yaml

* bump CI

* fixing unintall CI step

* moving theme files to main dir

* updating html_theme_path to match new dir structure

* Revert "moving theme files to main dir"

This reverts commit 6637355.

* Revert "updating html_theme_path to match new dir structure"

This reverts commit 8f32fe9.

* add package data paths to toml

* add data paths to manifest instead

* recursive include in manifest

* add python -m for safety

Co-authored-by: Irfan Alibay <IAlibay@users.noreply.github.com>

---------

Co-authored-by: Alyssa Travitz <atravitz@umich.edu>
Co-authored-by: Alyssa Travitz <31974495+atravitz@users.noreply.github.com>
Co-authored-by: Irfan Alibay <IAlibay@users.noreply.github.com>
  • Loading branch information
4 people authored Oct 31, 2024
1 parent 35b9246 commit a29dab6
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macOS-latest, ubuntu-latest, windows-latest]
os: [macOS-latest, ubuntu-latest]
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/test-doc-building.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Test openfe doc building

on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
schedule:
- cron: "0 7 * * 0"
workflow_dispatch:


concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true


defaults:
run:
shell: bash -leo pipefail {0}


jobs:
build_tests:
if: "github.repository == 'OpenFreeEnergy/ofe-sphinx-theme'"
name: Test Downstream Doc Building
runs-on: ubuntu-latest
steps:

- name: Checkout ofe-sphinx-theme
uses: actions/checkout@v4
with:
path: ofe

- name: Checkout openfe
uses: actions/checkout@v4
with:
repository: OpenFreeEnergy/openfe
path: openfe

- name: Install OpenFE Doc Env
uses: mamba-org/setup-micromamba@v1
with:
environment-file: openfe/docs/environment.yaml
environment-name: test-env

- name: Install ofe-sphinx-theme
run: |
# Remove the version we pulled in from the env and test
# the version on this PR
python -m pip uninstall ofe-sphinx-theme --yes
python -m pip install ofe/
- name: Install openfe
run: python -m pip install --no-deps openfe/

- name: Build the docs
run: python -m sphinx -T -W --keep-going -b html -d _build/doctrees -D language=en openfe/docs/ build_output/html
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include CODE_OF_CONDUCT.md
recursive-include ofe_sphinx_theme *

global-exclude *.py[cod] __pycache__ *.so

0 comments on commit a29dab6

Please sign in to comment.