You should have the following completed on your computer before the workshop:
- Have Node.js installed on your system. (Recommended: Use nvm.)
- Unfortunately, you'll need to be on Node 9.x or earlier. Dependencies are hard and one of the dependencies of one of our dependencies is set to not allow Node 10.x.
- Create an AWS account. (This will require a valid credit card.)
- Install multi-factor authentication app (e.g. Authy, Google Authenticator, Duo).
- Install the AWS CLI. (
brew install awscli
should do the trick. Otherwise, you'll need Python and PIP, which you can install usingbrew install python
.) - Install the AWS Mobile Hub CLI:
npm install -g awsmobile-cli
oryarn global add awsmobile-cli
. - Create a Travis CI account. (This should be as simple as logging in via GitHub).
- Optional: Install the Travis CLI command-line tools:
gem install travis -v 1.8.8 --no-rdoc --no-ri
- Optional: We'll be registering a domain name during the workshop. You can skip this step if you want.
This might be helpful at some point.
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::YOUR_BUCKET_NAME_HERE/*"
}
]
}
language: node_js
node_js:
- '8'
cache:
yarn: true
directories:
- node_modules
script:
- yarn test
before_deploy:
- yarn global add travis-ci-cloudfront-invalidation
- yarn run build
deploy:
provider: s3
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
bucket: $S3_BUCKET
skip_cleanup: true
local-dir: dist
on:
branch: master
after_deploy:
- travis-ci-cloudfront-invalidation -a $AWS_ACCESS_KEY_ID -s $AWS_SECRET_ACCESS_KEY -c $CLOUDFRONT_ID -i '/*' -b $TRAVIS_BRANCH -p $TRAVIS_PULL_REQUEST