Skip to content

Commit

Permalink
build: Build website in CI (#20)
Browse files Browse the repository at this point in the history
* build: Build website in CI

* Add build badge
  • Loading branch information
msrose committed Apr 25, 2019
1 parent a7c9db4 commit e5f8971
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 12 deletions.
34 changes: 22 additions & 12 deletions .circleci/config.yml
@@ -1,15 +1,7 @@
#
# This basic CircleCI config is just a starting point with some common structures that you might need to get started.
#
# Make it your own and go nuts!
#
# When in doubt, look up the CircleCI documentation, it has everything you need to know: https://circleci.com/docs/
#

version: 2.1

# Jobs: tasks that your CI pipeline can do

jobs:
build:
working_directory: ~/repo
Expand Down Expand Up @@ -46,7 +38,6 @@ jobs:
- run:
name: Run Linting
command: yarn lint

test:
working_directory: ~/repo
docker:
Expand All @@ -60,7 +51,6 @@ jobs:
- run:
name: Run Tests
command: yarn test

publish:
working_directory: ~/repo
docker:
Expand All @@ -74,8 +64,27 @@ jobs:
- run:
name: Publish New Package Version through npm
command: npm publish

# Workflows: stringing jobs together into a pipeline
website:
docker:
- image: circleci/node:8.11
working_directory: ~/repo/website
steps:
- checkout:
path: ~/repo
- restore_cache:
name: Restore node_modules cache
key: website-{{ .Branch }}-{{ checksum "yarn.lock" }}
- run: yarn install --frozen-lockfile
- save_cache:
name: Save node_modules cache
key: website-{{ .Branch }}-{{ checksum "yarn.lock" }}
paths:
- node_modules/
- run: yarn build
- persist_to_workspace:
root: ./
paths:
- build/

workflows:
version: 2
Expand Down Expand Up @@ -107,3 +116,4 @@ workflows:
only: /^v.*/
branches:
ignore: /.*/
- website
1 change: 1 addition & 0 deletions .gitignore
@@ -1,3 +1,4 @@
.vscode/settings.json
node_modules/
coverage
website/build
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -3,6 +3,7 @@
<span><img align="right" width="200" height="200" src="./website/static/img/monodeploy.svg" alt="monodeploy"></span>

[![npm](https://img.shields.io/npm/v/monodeploy.svg)](https://www.npmjs.com/package/monodeploy)
[![CircleCI](https://circleci.com/gh/tophat/monodeploy.svg?style=svg)](https://circleci.com/gh/tophat/monodeploy)
[![npm](https://img.shields.io/npm/dm/monodeploy.svg)](https://npm-stat.com/charts.html?package=monodeploy)
[![All Contributors](https://img.shields.io/badge/all_contributors-4-orange.svg?style=flat-square)](#contributors)

Expand Down

0 comments on commit e5f8971

Please sign in to comment.