Docs: update links to new docs & futher iteration #8
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Verify Documentation | |
on: | |
pull_request: | |
paths: | |
- 'docs/code-reference/**' | |
jobs: | |
verify-docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Need full history to compare with base branch | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.4' | |
extensions: mbstring, xml | |
coverage: none | |
- name: Install dependencies | |
run: composer install --prefer-dist --no-progress | |
- name: Generate fresh documentation | |
run: | | |
# Create temp directory for fresh docs | |
mkdir -p temp/code-reference | |
# Run full docs workflow with new output directory | |
DOCS_OUTPUT_DIR=temp/code-reference composer run docs | |
- name: Compare documentation | |
run: | | |
# Compare generated docs with existing docs | |
if ! diff -r --ignore-all-space --ignore-blank-lines --ignore-matching-lines='^<https.*>$' docs/code-reference temp/code-reference; then | |
echo "::error::Documentation in docs/code-reference does not match what would be generated from source code." | |
echo "::error::The markdown files are generated from PHP docblocks - please update the source code documentation instead." | |
exit 1 | |
fi |