Githubdeployments Plugin Build Example
An example plugin repository with a workflow script that generates a build version of the block being registered
by The WordPress Contributors · github.com/automattic/githubdeployments-plugin-build-example
★ 1stars
3forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/automattic/githubdeployments-plugin-build-example/archive/refs/heads/main.zipAn example plugin repository (of a plugin that registers a block) with a workflow script that generates a build version of the block being registered
The workflow does the following:
The workflow is triggered on pushes to the main branch or manually via workflow dispatch. It:
- Checkout the repository
- Instals Node with the Node Action
- Runs
npm installto install dependencies inpackage.json - Runs
npm run buildto run the build process - Creates a build artifact with name
wpcomwhich is required for WordPress.com's GitHub Deployment feature. The artifact contains the built plugin files, excluding development files like:- Git files
- Source files
- Node modules
- Package files
- Webpack config
- README