Continuous Integration

The theme’s codebase is versioned and stored at GitHub. Each network site receives automatic updates to the theme via the GitHub Updater plugin which is bundled with the theme.

When creating a new network site, follow these steps:

  1. Install the Elise parent theme, either via the Envato Market plugin (if configured) or by uploading the theme files. Activate the Elise theme.
  2. Install Visual Composer following the prompt, along with other desired plugins packaged with Elise.
  3. Download the latest version of the Fire Department theme from https://github.com/firstarriving/firedepts/releases. Unzip the bundle and delete the version tag from the theme directory name so that it reads ‘firedepts’. You can then re-compress the directory and upload it as a zip.
  4. Activate the Fire Department theme, and you will be prompted to install the GitHub Updater.
  5. SHORT TERM: Update the Core Theme & Elise MANUALLY, then add to GitHub once the site LAUNCHES with new domain. Do the last manual theme update just BEFORE the site launches

    • After creating the new install, additional configuration is required to automate updates. First you must find the correct API endpoint for the new install. To do so, find the GitHub Updater admin panel in Settings. From the GitHub Updater docs:

      …On the Remote Management tab, you will see a URL that serves as the endpoint for this. This url will look something like this:

      http://www.firstarrivingsites.com/wp-admin/admin-ajax.php?action=github-updater-update&key=76bb2b7c819c36ee37292b6978a4ad61

      The exact URL will of course depend on your system. The value for the key attribute is automatically generated on the first activation of the GitHub Updater plugin and is used for authentication. Any person or entity knowing this key will be able to change the versions of your installed plugins, but nothing else…

      You must also add an additional argument to the end of this url: &theme=firedepts. Your final url will look something like http://www.firstarrivingsites.com/wp-admin/admin-ajax.php?action=github-updater-update&key=76bb2b7c819c36ee37292b6978a4ad61&theme=firedepts

    • Now you will need to add this url to the theme repository’s Webhooks. After building the correct url, navigate to the GitHub repository page listed above. You must be logged in with an admin account to access the correct settings. Click the ‘Settings’ button and select the submenu item for ‘Webhooks’. You should see a list of existing webhooks. Click ‘Add Webhook’ and enter the url you previously built into the ‘Payload URL’ text input. Under where it says ‘Which events would you like to trigger this webhook?’, select ‘Let me select individual events’ and check only the box for ‘Release’. Make sure to deselect ‘Push’. Click ‘Add Webhook’ to finalize configuration.
    • Finally, this type of automation is blocked by default by WP Engine’s nginx configuration. They have to add an allowance per WordPress install to allow writing to the system when the WordPress is pinged by the Webhook you just created. In order to do this you will have to open a ticket with WP Engine support as no nginx customization is available through the WP Engine panel. You can reference support ticket #792164 which includes the original issue and their solution and response. You must do this for EACH new install, WPE has no automated way to do it across an entire account.  Usually takes just 15 minutes after opening chat session.

More information on the GitHub Updater plugin is available in their wiki.

IMPORTANT Note: If you enabled this for a staging/development site (i.e. devsite.wpengine.com or deptname.firstarrivingsites.com, etc) you will need to go back into Github and change the URL of the webhook once you make the site live. So devsite.wpengine.com becomes www.actualdomain.com (https:// or otherwise)