Infrastructure Integration

We integrated Handoff with a number of continuous integration systems, to allow you to automatically fetch tokens and keep both the token files and the web application up-to-date.

Handoff should fit within your existing infrastructure. To run the Handoff pipeline, all you need is Node 16. The static artifacts can be published to any site that can serve static html content.

Continuous Integration

Handoff is designed to be run by CI/CD systems. When you are first using Handoff you'll probably run it locally, but eventually, you'll want to automate the pipeline, so that tokens are automatically fetched, and the documentation stays in sync with Figma.

We currently use Figma with the Bitbucket Pipelines and GitHub Actions CI/CD. From these samples, it should be fairly easy to duplicate the behavior on any common platform like Jenkins, Bamboo or CircleCI.

Environment Vars

Regardless of where you run this, the code must have the following variables set as ENV vars in the bash shell:

1FIGMA_PROJECT_ID 2DEV_ACCESS_TOKEN 3

Both of the scripts below are designed to ship the output to AWS S3. To make that work, the following ENV variables should also be set:

1AWS_CLOUDFRONT_DIST_ID 2AWS_S3_BUCKET 3AWS_ACCESS_KEY_ID 4AWS_SECRET_ACCESS_KEY 5AWS_DEFAULT_REGION 6