GitHub Actions is currently in public beta so you may have to wait until you get access to this feature, before you can try it. You may apply for access. 🤞
GitHub Actions Library 📚
We’ve released three GitHub Actions
- PHPCS Code Review – Run PHPCS code review on pull requests.
- Deploy WordPress – Deploy a WordPress site using PHP’s Deployer.org.
- Slack Notify – Send a notification to a Slack channel
PHPCS Code Review 👨💻
GitHub has a pull request review feature which is usually used to perform a manual code review. But GitHub has an API which not only reviews the pull request code chunks but also performs and submits line-by-line code review, automatically.
The fine folks at Automattic already use this API for VIP’s automated code review part and they are generous enough to release their review scripts under GPL. Automattic uses TeamCity but we decided to make their code review script work with GitHub Actions.
PHPCS Code Review GitHub Action performs automated code review on your WordPress or, for that matter, any PHP project using Automattic’s scripts and GitHub API.
Deploy WordPress 🚀
Once your pull request passes review, the changes in code needs to be deployed on the server also. The Deploy WordPress GitHub action automates this using Deployer.org tool. The advantage of using Deployer is that it’s easy to rollback a deployment if something goes wrong.
Slack Notify ️🔔
This action is used to send a message in a Slack channel. It is generally used after deployment has completed notifying about deployment status.
À la carte 🍽️
While we have released three GitHub Actions today and they work nicely together, you don’t need to use them all together.
If you are new to GitHub Actions, you may start with one and then move ahead. Slack Notify is the easiest to use while Deploy WordPress needs the most one-time setup effort.
We hope our GitHub Actions Library makes automated code review and deployment easier for your WordPress projects.
Stay tuned for more (GitHub) actions! 👋