Skip to content

Instantly share code, notes, and snippets.

@Misaka-0x447f
Created May 30, 2019 10:45
Show Gist options
  • Save Misaka-0x447f/361a13d04174d6015fbefdcee063530e to your computer and use it in GitHub Desktop.
Save Misaka-0x447f/361a13d04174d6015fbefdcee063530e to your computer and use it in GitHub Desktop.
circle-ci aws config example
version: 2
jobs:
cicd:
working_directory: ~/circleci-working-dir-5efc0ca6
docker:
- image: circleci/node:10-jessie
environment:
NODE_ENV: production
S3_BUCKET: s3://dataapp-staging
steps:
- checkout
- run:
name: Update npm
command: 'sudo npm install -g npm@latest'
- restore_cache:
key: dependency-cache-{{ checksum "package.json" }}
- run:
name: Update dependencies
command: npm install
- save_cache:
key: dependency-cache-{{ checksum "package.json" }}
paths:
- node_modules
- run:
name: Install aws-cli
command: |
sudo apt-get install python-dev python-pip
sudo pip install awscli
- run:
name: Build
command: npm run build
- run:
name: Deploy
command: aws s3 sync --delete build/ $S3_BUCKET
workflows:
version: 2
main:
jobs:
- cicd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment