Continuous Deployment of Templates

This document explains how to deploy your static site templates to TakeShape whenever you push to your Git repository. It's possible to use your favorite CI/CD provider such as CircleCI, TravisCI, Netlify, Jenkins, etc. Here are the basic steps:

  1. Make sure that your have configured a Static Site and note the projectId and siteId in the url (<projectId>/sites/<siteId>) we'll need these later.
  2. Create an API key with the "CI" role. This role has content read permissions as well as the ability to deploy static site templates and trigger static site publishes. Be sure to copy the API key.
  3. In your CI Provider set the variables you copied it steps 1 and 2 as environment variables TS_PROJECT_ID, TS_SITE_ID and TS_AUTH_TOKEN.
  4. Ensure that your project's package.json is using the latest version of takeshape-cli it should be ^4.77.0.
  5. Set your build command to npx tsg deploy 

Now when you push updates to your template code CI will push your templates to TakeShape and TakeShape will deploy static HTML to your configured host.

Join us

Interested in joining the team as coworker or investor?