Note:
<example>is meant to denote text replaced by you (including brackets).
// global dependencies
npm install -g knexI got to here after spending hours trying to deploy to an Elastic Beanstalk instance via CircleCi 2.0 so I thought I'd write up what worked for me to hopefully help others. Shout out to RobertoSchneiders who's steps for getting it to work with CircleCi 1.0 were my starting point.
For the record, I'm not the most server-savvy of developers so there may be a better way of doing this.
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset='utf-8' /> | |
| <title>Draw Color Change Example</title> | |
| <meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' /> | |
| <script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.44.0/mapbox-gl.js'></script> | |
| <link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.44.0/mapbox-gl.css' rel='stylesheet' /> | |
| <style> |
| /** | |
| * we are going to upload file to s3 via node js by using | |
| * aws-sdk - required | |
| * busboy - required | |
| * uuid - optional - for image renaming purpose | |
| * with this library you can upload any kind of file to s3 via node js. | |
| */ | |
| const AWS = require('aws-sdk'); | |
| const UUID = require('uuid/v4'); |
| # | |
| # Github Actions for Serverless Framework | |
| # | |
| # Create AWS_KEY and AWS_SECRET secrets in Github repository settings | |
| # If you're using env.yml file, store its content as ENV Github secret | |
| # | |
| # Master branch will be deployed as DEV and every new tag starting with "v**" (e.g. v1.0, v1.2, v2.0, etc) will be deployed as PROD | |
| # | |
| # Learn more: https://maxkostinevich.com/blog/how-to-deploy-serverless-applications-using-github-actions/ | |
| # |