Skip to content

Commit b4cbd29

Browse files
committed
GitHub Actions: Fail if docs manifest outdated
1 parent 93776c0 commit b4cbd29

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Keep docs manifest up to date
2+
on:
3+
pull_request:
4+
types: [opened, synchronize]
5+
branches:
6+
- trunk
7+
paths:
8+
- docs/**/*.md
9+
10+
jobs:
11+
check-docs-manifest:
12+
name: Check docs manifest for staleness
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Setup PHP
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: '8.4'
22+
tools: composer:v2
23+
24+
- name: Install dependencies
25+
run: composer install
26+
27+
- name: Regenerate manifest
28+
run: composer run docs:manifest
29+
30+
- name: Check whether manifest has been updated
31+
env:
32+
MANIFEST_PATH: docs/bin/manifest.json
33+
run: |
34+
if ! git diff --quiet -- "$MANIFEST_PATH"; then
35+
echo "There are documentation changes in this branch that require that the docs manifest be regenerated."
36+
echo
37+
echo "Please run 'composer run docs:manifest' and commit $MANIFEST_PATH"
38+
exit 1
39+
fi

0 commit comments

Comments
 (0)