Skip to content

Commit ac3055a

Browse files
authored
GitHub Actions: Warn if docs manifest possibly outdated (#232)
* GitHub Actions: Fail if docs manifest outdated Props mcsf, priethor.
1 parent 19e9a7a commit ac3055a

File tree

1 file changed

+35
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)