Tested up to WordPress v5.6.1
License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html
A WordPress Plugin to push new pages or updates from your headless WordPress CMS to a Frontend, such as a Gatsby App on AWS via GitHub Actions.
- Your WordPress CMS has already been connected to your Gatsby App. If not, this Youtube video will help you get started.
- Your Gatsby App has been successfully deployed to AWS/S3 using GitHub Actions. (If not you can check out this Blog Post by Anna Aitchison) At this time, GitHub does not provide a re-run button for GitHub Actions. I have written a concise tutorial on how to run GitHub Actions manually using Postman client.
Here is what you need to do in order to get this plugin to work
- Create a folder containing one PHP file
- Hook into WordPress actions to create admin dashboard menu item
- Create a button with onClick to POST to GitHub Actions API to re-publish the Gatsby App to AWS/S3
- Create a personal token in GitHub to use for GitHub Actions API authorization
- Create zip file of plugin folder, upload to WordPress and activate
- Download the plugin and insert your details into the code. You can do so with Vim or by opening up the php file in a code editor such as VSCode
- Log into your Wordpress and navigate to 'Add new plugin'
- Upload the folder and activate the plugin
For all steps on how to setup a WordPress/GitHub Action integration with this plugin please follow my Twilio Tutorial
This is the admin page of the 'Deploy to GitHub Actions' plugin. You can add/delete buttons to deploy to your GitHub branches if you wish. Please remember to download the plugin and insert your GitHub details before zipping it back up and uploading the plugin.
Once you hit either of the buttons, you will receive a success message that your GitHub Action is running.