This template is a pre-configured starting point for custom plugin development on the Newspack platform. It will give you all of the tools you needs to get up and running quickly.
- A pre-configured build process provided by the
@wordpress/scripts
package. This is the standard build process for WordPress. For more information on configuration and options, please see the official documentation. - A PHP CodeSniffer configuration that will check your code against the coding standards that are recommended by the Newspack team.
- A Prettier configuration for WordPress.
- A Husky configuration to lint local files changes before they are committed.
- A GitHub action to check that your commits and merges adhere to the correct coding standards
- A GitHub action to automatically deploy your changes to the production environment when merged to trunk.
- A GitHub action to automatically deploy your changes to the staging environment when pushing to the
staging
branch.
- Start by clicking the
Use this template
button to create a new repository in your own GitHub account from this template. - In the Secrets and Variables->Actions sections under the Settings menu of the new repository. Create new the secrets outlined in the table below.
- In the Settings->Branches section of the new repository, set the branch protection rules to require a pull request to trunk, an approved review, and status checks to pass before merging.
- In Settings->Collaborators and teams section of the new repository, add the Newspack team as a collaborators with write access. You may need to add them individually and you can get their usernames from the Newspack team.
- Checkout the repo locally and run
npm run setup
to install everything. - In it doesn't already exist, create and
staging
branch and push it to the remote repository. - Start developing!
Secret | Description |
---|---|
PROD_SFTP_USER | The username for the Production SFTP server |
PROD_SFTP_PASSWORD | The password for the Production SFTP server |
STAGING_SFTP_USER | The username for the Staging SFTP server |
STAGING_SFTP_PASSWORD | The password for the Staging SFTP server |