Skip to content

Commit 8735729

Browse files
committed
Run linting/fixing before compare
1 parent 7b2cf10 commit 8735729

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

.github/workflows/verify-docs.yml

+10-5
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,25 @@ jobs:
2222
coverage: none
2323

2424
- name: Install dependencies
25-
run: composer install --prefer-dist --no-progress
25+
run: |
26+
# Install PHP dependencies
27+
composer install --prefer-dist --no-progress
28+
# Install Node.js dependencies
29+
npm ci
2630
2731
- name: Generate fresh documentation
2832
run: |
2933
# Create temp directory for fresh docs
3034
mkdir -p temp/code-reference
31-
# Generate fresh documentation
32-
php docs/bin/generate-parsed-md.php --output=temp/code-reference
35+
36+
# Run full docs workflow with new output directory
37+
DOCS_OUTPUT_DIR=temp/code-reference composer run docs
3338
3439
- name: Compare documentation
3540
run: |
3641
# Compare generated docs with existing docs
37-
if ! diff -r --ignore-all-space --ignore-blank-lines docs/code-reference temp/code-reference; then
42+
if ! diff -r --ignore-all-space --ignore-blank-lines --ignore-matching-lines='^<https.*>$' docs/code-reference temp/code-reference; then
3843
echo "::error::Documentation in docs/code-reference does not match what would be generated from source code."
39-
echo "::error::Please update the source code documentation instead of modifying the generated files directly."
44+
echo "::error::The markdown files are generated from PHP docblocks - please update the source code documentation instead."
4045
exit 1
4146
fi

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"scripts": {
2424
"docs:manifest": "php docs/bin/generate-manifest.php",
2525
"docs:links": "php docs/bin/update-markdown-links.php",
26-
"docs:parse": "php docs/bin/generate-parsed-md.php",
26+
"docs:parse": "php docs/bin/generate-parsed-md.php --output=${DOCS_OUTPUT_DIR:-docs/code-reference}",
2727
"docs:fix": "npm run fix:md",
2828
"docs:lint": "npm run lint:md",
2929
"docs": [

0 commit comments

Comments
 (0)