Skip to content

Latest commit

 

History

History
31 lines (25 loc) · 1002 Bytes

File metadata and controls

31 lines (25 loc) · 1002 Bytes

Asset Builds

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-content

The workflow:

  • installs Composer dependencies when composer.json exists;
  • runs composer compile-assets when that script exists;
  • installs npm/yarn/pnpm dependencies when package.json exists;
  • 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.