Skip to content

Commit

Permalink
♻️ operation CI take 1
Browse files Browse the repository at this point in the history
  • Loading branch information
acidjazz committed Apr 11, 2018
1 parent fa26c4e commit d41c1e0
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 1 deletion.
39 changes: 39 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
version: 2
jobs:
build:
docker:
# specify the version you desire here
- image: circleci/node:9.4

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/mongo:3.4.4

working_directory: ~/repo

steps:
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ arch}}-{{ .Branch }}-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run: yarn install

- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ arch}}-{{ .Branch }}-{{ checksum "package.json" }}

# run tests!
- run: yarn test

- deploy:
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
yarn run production
fi
9 changes: 9 additions & 0 deletions operations/aeonian.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
reuqire('aeonian').config({
bucket: {
localDir: './dist/',
prefix: 'website-'
},
environments: {
production: 'E2YTKR1O72BT2P',
}
}).deploy(process.argv[2])
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
"start": "nuxt start",
"generate": "nuxt generate",
"lint": "eslint --ext .js,.vue --ignore-path .gitignore .",
"precommit": "npm run lint"
"precommit": "npm run lint",
"production": "yarn cash; yarn generate; node operations/aeonian.js production",
"test": "echo No tests yet"
},
"dependencies": {
"nuxt": "^1.0.0",
Expand Down
7 changes: 7 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,10 @@
</p>

> Pub website
## Branch Status

master | staging
--- | ---
[![CircleCI](https://circleci.com/gh/pub-media/website/tree/master.svg?style=shield&circle-token=3d73d84668cccfb164c94a694d6967d5e17a2d06)](https://circleci.com/gh/pub-media/website/tree/master) | [![CircleCI](https://circleci.com/gh/pub-media/website/tree/staging.svg?style=shield&circle-token=3d73d84668cccfb164c94a694d6967d5e17a2d06)](https://circleci.com/gh/pub-media/website/tree/staging)

0 comments on commit d41c1e0

Please sign in to comment.