Skip to content

Commit 2b9f969

Browse files
authored
fix(ci): fix building docs before running tests (#527)
1 parent a3d476f commit 2b9f969

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

.github/workflows/publish.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,9 @@ on:
66
branches: [ main ]
77

88
jobs:
9-
docs:
9+
build:
1010
if: |
1111
contains(github.event.head_commit.message, 'chore(main): release')
12-
uses: ./.github/workflows/build-docs.yml
13-
build:
14-
needs:
15-
- docs
1612
name: Build distribution 📦
1713
runs-on: ubuntu-latest
1814
steps:

.github/workflows/tests.yml

+11-1
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,18 @@ on:
77
types: [opened, synchronize, reopened, ready_for_review]
88

99
jobs:
10+
docs:
11+
if: |
12+
github.event.pull_request.draft == false && contains(github.event.pull_request.title, 'chore(main): release')
13+
uses: ./.github/workflows/build-docs.yml
1014
test:
11-
if: github.event.pull_request.draft == false
15+
16+
# together this means the test are run after the docs (which create a new commit)
17+
# but don't require the docs to have run, so it also runs on non-release PRs
18+
if: ${{ github.event.pull_request.draft == false && always() }}
19+
needs:
20+
- docs
21+
1222
runs-on: ubuntu-latest
1323
container: riedmiki/gromacs-plumed-python:2023.5-plumed
1424
steps:

0 commit comments

Comments
 (0)