Skip to content

Commit 369441a

Browse files
committed
get rid of final message step
1 parent ff65f31 commit 369441a

File tree

1 file changed

+10
-17
lines changed

1 file changed

+10
-17
lines changed

.github/workflows/check-docs.yml

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -35,28 +35,21 @@ jobs:
3535
run: yarn
3636
- name: Run doc generation
3737
run: yarn docgen:all
38-
- name: Check for changes in common/api-review dir (fail if so)
39-
id: api-report-check
38+
# Fail first if there are docs-devsite changes since running yarn docgen:all
39+
# will also regenerate any API report changes.
40+
- name: Check for changes in docs-devsite dir (fail if so)
4041
run: |
41-
if [[ -n "$(git status common/api-review --porcelain)" ]]; then
42-
echo "Unstaged changes detected in api-report(s):"
42+
if [[ -n "$(git status docs-devsite --porcelain)" ]]; then
43+
echo "Unstaged changes detected in docs-devsite/:"
4344
git status -s
44-
echo "command-to-run='yarn build'" >> $GITHUB_OUTPUT
45+
echo "Changes in this PR affect the reference docs or API reports. Run \`yarn docgen:all\` locally to regenerate the changed files and add them to this PR."
4546
exit 1
4647
fi
47-
# Overwrite the command if there are also docs-devsite changes since
48-
# running yarn docgen:all will also run yarn build first.
49-
- name: Check for changes in docs-devsite dir (fail if so)
50-
id: docs-check
48+
- name: Check for changes in common/api-review dir (fail if so)
5149
run: |
52-
if [[ -n "$(git status docs-devsite --porcelain)" ]]; then
53-
echo "Unstaged changes detected in docs-devsite/:"
50+
if [[ -n "$(git status common/api-review --porcelain)" ]]; then
51+
echo "Unstaged changes detected in api-report(s):"
5452
git status -s
55-
echo "command-to-run='yarn docgen:all'" >> $GITHUB_OUTPUT
53+
echo "Changes in this PR affect the API reports. Run \`yarn build\` locally to regenerate the API reports and add them to this PR."
5654
exit 1
5755
fi
58-
- name: Reference documentation needs to be updated. See message below.
59-
if: ${{ failure() }}
60-
run: echo "Changes in this PR affect the reference docs or API reports. Run \`$COMMAND_TO_RUN\` locally to regenerate the changed files and add them to this PR."
61-
env:
62-
COMMAND_TO_RUN: ${{ steps.docs-check.outputs.command-to-run || steps.api-report-check.outputs.command-to-run }}

0 commit comments

Comments
 (0)