Automated deployments using GitHub action

Last updated on 2020/10/08

|

by Janez Troha

Featured post image

WooCart now supports deploying a plugin or theme from a repository with GitHub Action WooCart Deploy.

GitHub Actions allow you to run operations around your code. Even though this type of deployment process is not common in the WordPress community, it does have many benefits.

For more information about Actions check out GitHub Docs and our Help Article.

Setting up the workflow

Get WebDAV credentials from the Settings tab in WooCart, and open your GitHub repository with the code. If you’re doing this the first time, I recommend you try it out on the staging store first.

We published an example repository that you can use for the starting point. Steps to replicate the deployment on your store boil down to the following:

  1. Follow the instructions at https://github.com/woocart/deploy-action#example-usage.
  2. Set the credentials as described in https://help.woocart.com/article/263-deploying-from-github.
  3. Push code to GitHub.
  4. Visit the Actions tab on your repo and see in realtime what is going on. After the process is done a new plugin should appear in your WordPress Plugins page.
GitHub Action in action. 🙂
Example plugin deployed through GitHub.

What else can I do?

The WooCart GitHub action is just a small part that can power much larger workflows.

For example, if you want to test the code before deployment (and you should) then you can combine it with PHPUnit actions.

There are many other interesting workflows you can use so make sure to check out the GitHub marketplace.