Skip to content

Commit fba6486

Browse files
committed
ci: Validate before building the docs in the deploy job
The docs build is the slowest step in the job and nothing about publishing depends on it, so running lint, format:check and the tests first means a failing check stops the job before that minute is spent. Build and the publish steps that follow are unchanged.
1 parent c700810 commit fba6486

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

‎.github/workflows/deploy.yml‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,20 +74,22 @@ jobs:
7474
- name: Upgrade npm for trusted publishing
7575
run: npm install -g npm@^11.5.1
7676

77-
# Run `npm ci && npm run build` to re-create your local environment (make sure to commit your - package-lock.json!).
78-
- name: Build
79-
run: |
80-
npm ci
81-
npm run build
77+
# Run `npm ci` to re-create your local environment (make sure to commit your - package-lock.json!).
78+
- name: Install
79+
run: npm ci
8280

8381
# Nothing below this point runs if the package does not lint, format or test
8482
# cleanly, so a push to testing cannot publish a beta that was never checked.
83+
# Ahead of the docs build, which is the slowest step here.
8584
- name: Validate
8685
run: |
8786
npm run lint
8887
npm run format:check
8988
npm test
9089
90+
- name: Build
91+
run: npm run build
92+
9193
- name: Version bump patch
9294
if: github.event.inputs.versionBumpType == 'patch' || contains(github.event.head_commit.message, '#patch') && !contains(github.event.head_commit.message, '#minor') && !contains(github.event.head_commit.message, '#major')
9395
run: |

0 commit comments

Comments
 (0)