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:
- Make sure that your have configured a Static Site and note the
siteIdin the url (
https://app.takeshape.io/projects/<projectId>/sites/<siteId>) we'll need these later.
- 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.
- In your CI Provider set the variables you copied it steps 1 and 2 as environment variables
TS_API_KEY. Set the
TS_SITE_NAMEvariable to the name of your static site.
- Ensure that your project's
package.jsonis using the latest version of
@takeshape/cliit should be
- Set your build command to
npx takeshape 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.