Last active
January 15, 2019 15:47
-
-
Save yai333/e2a05e52817d7c962db9519d9f6b98b6 to your computer and use it in GitHub Desktop.
config.yml
This file contains 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
defaults: &defaults | |
docker: | |
- image: circleci/node:8 | |
version: 2 | |
jobs: | |
pre-build: | |
working_directory: ~/gatsbyBlog | |
<<: *defaults | |
steps: | |
- checkout: | |
path: ~/gatsbyBlog/ | |
- attach_workspace: | |
at: ~/gatsbyBlog/ | |
- restore_cache: | |
key: node-v2-{{ checksum "package.json" }}-{{ arch }} | |
- run: npm install | |
- save_cache: | |
key: node-v2-{{ checksum "package.json" }}-{{ arch }} | |
paths: | |
- node_modules | |
- persist_to_workspace: | |
root: ~/gatsbyBlog | |
paths: | |
- node_modules | |
lint: | |
working_directory: ~/gatsbyBlog | |
<<: *defaults | |
steps: | |
- checkout | |
- attach_workspace: | |
at: ~/gatsbyBlog | |
- run: npm run lint | |
gatsby-deploy: | |
working_directory: ~/gatsbyBlog | |
<<: *defaults | |
steps: | |
- checkout: | |
path: ~/gatsbyBlog/ | |
- attach_workspace: | |
at: ~/gatsbyBlog | |
- run: | |
command: | | |
sudo apt-get -y -qq install awscli | |
CI=false npm run build:ci | |
aws s3 sync public/ s3://gatsby-ci-demo --region ap-southeast-2 --delete | |
workflows: | |
version: 2 | |
front-backend: | |
jobs: | |
- pre-build: | |
filters: | |
branches: | |
only: | |
- master | |
- lint: | |
requires: | |
- pre-build | |
- gatsby-deploy: | |
requires: | |
- lint | |
filters: | |
branches: | |
only: | |
- master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment