Use assets-build.yml for Composer asset compiler builds, Node builds, or both.
jobs:
assets:
uses: sympress/workflows/.github/workflows/assets-build.yml@v1
with:
working_directory: .
run_asset_compiler: true
run_node_build: true
artifact_name: assets
artifact_path: public/wp-contentThe workflow:
- installs Composer dependencies when
composer.jsonexists; - runs
composer compile-assetswhen that script exists; - installs npm/yarn/pnpm dependencies when
package.jsonexists; - runs the configured build script when present;
- optionally uploads build output as an artifact.
Node installs require pnpm-lock.yaml, yarn.lock, package-lock.json, or
npm-shrinkwrap.json by default. Add a lockfile instead of enabling
allow_unpinned_node_install unless the caller is a trusted compatibility
workflow.
Hidden files are excluded from uploaded artifacts unless
artifact_include_hidden_files: true is set explicitly.