We have been working on GitHub Actions since January and we’re excited to formally release our GitHub Actions Library today. πŸŽ‰

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 πŸ‘¨β€πŸ’»

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.

πŸ“Ž PHPCS Code Review setup and usage instructions

The inline comment by rtBot is part of automated code-review on this pull-request.

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.

This action requires your git repo layout to match our WordPress Skeleton. Since our skeleton is based on the VIP Go Skeleton, if you have a VIP Go site, there won’t be much changes required.

πŸ“Ž Deploy WordPress setup and usage instructions

Sample Deploy WordPress Log

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.

πŸ“Ž Slack Notify setup and usage instructions

Sample Slack Notification

Γ€ 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! πŸ‘‹

Link: rtCamp’s GitHub Actions Library