Skip to content

Commit 9dff0fa

Browse files
authored
Merge pull request #263 from OpenFreeEnergy/feat/build-openfe-docs
Start of workflow to test doc building
2 parents a3953e9 + cb85f42 commit 9dff0fa

File tree

1 file changed

+42
-10
lines changed

1 file changed

+42
-10
lines changed

.github/workflows/openfe-doc-build.yaml

Lines changed: 42 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,58 @@ name: Test openfe doc build
22

33
on:
44
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
branches:
10+
- main
11+
schedule:
12+
# nightly tests, 2 am
13+
- cron: "0 2 * * *"
14+
15+
concurrency:
16+
group: "${{ github.workflow }}-${{ github.ref }}"
17+
cancel-in-progress: true
18+
19+
defaults:
20+
run:
21+
shell: bash -leo pipefail {0}
522

623
jobs:
724
test-conda-build:
825
runs-on: ubuntu-latest
926

1027
steps:
11-
- name: Checkout ExampleNotebooks repository
12-
uses: actions/checkout@v4
13-
with:
14-
path: openfe/docs/
15-
1628
- name: Checkout conda-forge feedstock
1729
uses: actions/checkout@v4
1830
with:
1931
repository: OpenFreeEnergy/openfe
2032
path: openfe
2133

22-
- name: Test file layout
34+
- name: Checkout ExampleNotebooks repository
35+
uses: actions/checkout@v4
36+
with:
37+
path: openfe/docs/ExampleNotebooks
38+
39+
- name: Get current date
40+
id: date
41+
run: echo "date=$(date +%Y-%m-%d)" >> "${GITHUB_OUTPUT}"
42+
43+
- name: Install doc environment
44+
uses: mamba-org/setup-micromamba@v2
45+
with:
46+
environment-file: openfe/docs/environment.yaml
47+
cache-environment: true
48+
cache-downloads: true
49+
cache-environment-key: environment-${{ steps.date.outputs.date }}
50+
cache-downloads-key: downloads-${{ steps.date.outputs.date }}
51+
init-shell: bash
52+
53+
- name: Build the docs
2354
run: |
24-
pwd
25-
ls -l
26-
ls -l *
27-
ls -l openfe/docs
55+
cd openfe
56+
# install so that we can get a version metadata we use in docs
57+
pip install . --no-deps
58+
cd docs
59+
make html

0 commit comments

Comments
 (0)