H5 tools site

Release

Craft Automated Staging.

Commit your code to git and it gets staged. Automagically.

deploy_example_repo

Example repository for organizing banners to be deployed using the Craft Staging webhook.

Structure

For performance, if a repo contains richmedia units, separate it into standard and richmedia folders at the root level. If there's no richmedia, the root level can contain campaigns or just a standard folder.

Standard and Richmedia
RepoName
      ├──"richmedia"
      │   ├── CampaignName
      │   │   ├── BannerName-XXXxXXX
      ├── "standard"
      │   ├── CampaignName
      │   │   ├── BannerName-XXXxXXX
Standard-only repository
RepoName
      ├── CampaignName
      │   ├── BannerName-XXXxXXX
      ├── CampaignName
      │   ├── BannerName-XXXxXXX

Setting up the Webhook

To automatically deploy banners to staging, a webhook needs to be added to the repository.

  1. Go to settings->Webhooks & services inside a repository to manage webhooks.
  2. Click 'Add webhook'.
  3. Enter Payload URL http://craftny-deploy-env.elasticbeanstalk.com/aws-staging and secret.
  4. Click 'Add webhook'.

Output

Banners will be automatically staged to the Craft staging environment.

  • Webhook searches repository for all dist folders so banners must be built prior to staging.
  • Repository staged to the url http://ec2-174-129-103-101.compute-1.amazonaws.com/banners/RepoName/
  • Staging for this repository can be found at deploy_example_repo
  • Banner link title is determined by the parent folder name of the dist folder.
  • Campaign header title is determined by the grandparent folder name of the dist folder.
  • Following this naming convention creates the following output.

RepoName

CampaignName (campaign header)
BannerName-XXXxXXX (banner link title)

Tips

If your banner isn't staging within 5 minutes, please check the following:

  • Is your banner ignoring the node_modules folder?
  • Did you build your banner to the dist folder prior to pushing?