chore(docs): add hookdoc build workflow#1201
Open
utkarshcloudinary wants to merge 1 commit into
Open
Conversation
Adds a GitHub Actions workflow to build and publish PHP hook documentation to GitHub Pages, replacing the need for a dedicated long-lived docs branch. - Workflow triggers on push to master, release publish, and manual dispatch - Adds jsdoc + wp-hookdoc (with patch) + patch-package - Adds build:docs script; does not modify main build pipeline - Ignores generated docs/ output (published to gh-pages)
d79cd5e to
e6e9051
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a GitHub Actions workflow to build and publish PHP hook documentation to GitHub Pages, replacing the need for a dedicated long-lived
feature/documentationbranch.Changes
.github/workflows/build-docs.yml— new workflow. Triggers:masterworkflow_dispatch)hookdoc-conf.json— jsdoc config.hookdoc/layout.tmpl— hookdoc HTML templatepatches/wp-hookdoc+0.2.0.patch— patcheswp-hookdoc@0.2.0to accept standard PHPDoc tag syntax (PHPStan-clean)package.json:build:docsscript (does NOT modify mainbuild— keeps CI fast)postinstallrunspatch-packagebeforecomposer installjsdoc,patch-package,wp-hookdoc.gitignore— ignores generateddocs/output (published togh-pagesby workflow)Verified locally
npm installsucceeds; patch-package applies cleanlynpm run build:docsgenerates 113 documentation filesPost-merge setup
One-time GitHub setup after merging to
master:gh-pagesbranch,/ (root)GH_PATsecret needed — uses built-inGITHUB_TOKENWhy not update main
buildscript?The original
feature/documentationbranch madebuildalso runbuild:docs, which would slow every CI run (lint, PR checks, package builds). Docs only need to build when publishing, so we isolate it to its own workflow.