/ Partner Guides

Our GitHub Workflow for Pressable sites

We use DeployHQ to automatically deploy code from GitHub to development and production sites on Pressable. Here is our workflow:

GitHub Branches and workflows

  • The trunk branch deploys to the production Pressable environment automatically, and the develop branch deploys to the development environment.
  • The repository deploys to the wp-content folder.
  • When working on a bug or a new feature, commit and push your changes to a feature branch (for example feature/new-feature or fix/broken-thing).
    • Please use trunk as the base for your feature branch.
  • Testing on the development site
    • Once you’re ready for testing on the dev site, create a PR to merge your feature branch into the develop branch when you’re ready to test on the development site; the changes should be auto-deployed.
  • Deploying to production
    • The trunk branch is used for the production site.
    • When you’re ready to submit your code to the production site, create a PR from your feature branch to the trunk branch.
    • DO NOT MERGE develop INTO trunk !
    • Once merged, DeployHQ will deploy the changes to the production site.

Managing plugins

  • Plugins do not need to be managed via Git unless they are custom plugins that you develop.
    If they are critical to the site’s function, feel free to put them in the mu-plugins folder.

Code checking and validation

  • We validate all code against the WordPress-Extra ruleset – All PRs are auto-checked and must pass the checks before merging.
  • We usually run these commands before we commit or push:
    • This will run the sniffer on all files in the directory you’re in phpcs --standard=WordPress-Extra --extensions=php -psv
    • You can limit that to a single file, for example phpcs --standard=WordPress-Extra -psv filename.php
    • And you can have it auto-fix lots of the formatting errors by running phpcbf --standard=WordPress-Extra --extensions=php -psv

If you run into any issues or need assistance, don’t hesitate to email us.