Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ on:
- 'components/**'
- 'docs/**'
- 'bin/build-docs-bundle.sh'
- 'bin/build-reference.py'
- 'bin/_docs_components.py'
- 'bin/_load_catalog.py'
- 'bin/build-reference.php'
- 'composer.json'
- 'composer.lock'
- '.github/workflows/docs.yml'
Expand Down Expand Up @@ -46,7 +44,7 @@ jobs:
rm -f docs/assets/php-toolkit.zip
zip -qr docs/assets/php-toolkit.zip components vendor bootstrap.php composer.json \
-x "*/Tests/*" "*/tests/*" "*/.git/*" "*/.github/*" "*/node_modules/*"
python3 bin/build-reference.py
php bin/build-reference.php

- uses: actions/upload-pages-artifact@v3
with:
Expand Down
18 changes: 6 additions & 12 deletions .github/workflows/snippet-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,16 @@ name: Verify docs snippets
# next to the snippet in markdown. Anything that drifts fails CI; anything
# that errors out also fails CI.
#
# Snippets in run-snippets.py's NO_EXPECTED allowlist are runnable but their
# stdout is unstable (real network traffic, timestamps), so they're verified
# to exit 0 without an output comparison.
# Snippets in run-snippets.php's NO_EXPECTED allowlist are runnable but
# their stdout is unstable (real network traffic, timestamps), so they're
# verified to exit 0 without an output comparison.

on:
pull_request:
paths:
- 'components/**'
- 'bin/_docs_components.py'
- 'bin/_load_catalog.py'
- 'bin/run-snippets.py'
- 'bin/build-reference.php'
- 'bin/run-snippets.php'
- 'composer.json'
- 'composer.lock'
- '.github/workflows/snippet-tests.yml'
Expand All @@ -36,13 +35,8 @@ jobs:
tools: composer
coverage: none

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install toolkit dependencies
run: composer install --no-dev --optimize-autoloader --no-progress

- name: Run docs snippets and compare to expected output
run: bin/run-snippets.py --check
run: php bin/run-snippets.php --check
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,11 @@ composer lint-fix

#### Building the docs site

The docs site under `docs/` is generated from `bin/_docs_components/<slug>.md`. To rebuild and preview locally:
The docs site under `docs/` is generated from each `components/<Name>/README.md`. To rebuild and preview locally:

```sh
bash bin/build-docs-bundle.sh # bundles toolkit + regenerates HTML
python3 bin/serve-docs.py # opens http://localhost:8787
php bin/serve-docs.php # opens http://localhost:8787
```

Snippets in the markdown sources run in CI on every PR (see `.github/workflows/snippet-tests.yml`) and in WordPress Playground from the live site.
Expand Down
231 changes: 0 additions & 231 deletions bin/_docs_components.py

This file was deleted.

Loading
Loading