Cyclic apps are built and deployed into AWS from code that originates in Github.
To trigger a build and deployment, install the Cyclic Github app on any public repo. On first installation we will assign your repo to an app and give it a public url such as
random-words.cyclic.app. We will then build and deploy your app as described below. On future commits to the default branch (for example: merges of PRs or pushes) Github will send a webhook api call to us. We will then perform the same build and deploy steps.
The input of the build step is a single commit in a git repo and the output is a zip archive that can be deployed and run inside of an AWS lambda with the Cyclic lambda runtime.
The following is a close approximation of the code we use to take your code repo and turn it into an artifact that can be run inside of AWS Lambda with the Cyclic lambda runtime.
Note: we use
npm version 6.x throughout.
npm install: Install your code's dependencies (including
npm run build: Build your app if you have a
buildscript defined in
npm prune: Prune any
devDependenciesto minimize the size of the output zip
zip: Zip all of your code and installed dependencies (for example
Note: we have limits on the maximum amount of disk space used for code + dependencies while building and on the final bundle size. See limits page for more details.
Customize the build process
NPM executes several lifecycle scripts as part of the
npm install and
npm run build. According to the documentation these are run in the following order:
npm run build
If you have particular needs try putting it into the appropriate lifecycle script. If you have needs beyond what these lifecycle scripts can provide or they don't solve for your use case send us an email: firstname.lastname@example.org or join us on Discord