version: 2
jobs:
build:
docker:
- image: circleci/node:7.10
working_directory: ~/repo
steps:
- add_ssh_keys:
fingerprints:
- "e0:f1:7b:8c:b1:4c:49:6f:b9:bd:af:84:6d:dd:93:cb"
- checkout
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-
- run: yarn install
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
- run: cp .circleci/mock.env.json .env.json
- run: grunt build
- run: git config credential.helper 'cache --timeout=120'
- run: git config user.email "ericnakagawa@gmail.com"
- run: git config user.name "CircleCI Bot"
- run: git add .
- run: git commit -m "Deploying theme build via CircleCI"
- run: git push -q git@github.com:pytorch/pytorch_sphinx_theme.git master
workflows:
version: 2
commit-and-build:
jobs:
- build