Created
May 30, 2019 10:45
-
-
Save Misaka-0x447f/361a13d04174d6015fbefdcee063530e to your computer and use it in GitHub Desktop.
circle-ci aws config example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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