Skip to content
This repository has been archived by the owner on Jan 21, 2021. It is now read-only.

Commit

Permalink
Update circleci configuration
Browse files Browse the repository at this point in the history
Add badge to readme.
  • Loading branch information
tusbar committed Aug 6, 2018
1 parent 4558204 commit eb41c89
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 26 deletions.
52 changes: 28 additions & 24 deletions .circleci/config.yml
Expand Up @@ -4,7 +4,7 @@ defaults:
workspace_root: &workspace_root
~/templatedatagouv

container: &default_container
nodejs_container: &nodejs_container
working_directory: *workspace_root
docker:
- image: circleci/node:8
Expand All @@ -21,19 +21,28 @@ defaults:
- v1-templatedatagouv-node-

jobs:
install:
<<: *default_container
checkout:
<<: *nodejs_container
steps:
- checkout

- persist_to_workspace:
root: *workspace_root
paths:
- ./

install:
<<: *nodejs_container
steps:
- *attach_workspace
- *restore_node_modules

- restore_cache:
name: Restore yarn cache
keys:
- v1-templatedatagouv-yarn-{{ checksum "yarn.lock" }}
- v1-templatedatagouv-yarn-

- *restore_node_modules

- run:
name: Install dependencies
command: yarn
Expand All @@ -50,17 +59,8 @@ jobs:
paths:
- node_modules/

- run:
name: Remove node_modules to cleanup workspace
command: rm -r node_modules/

- persist_to_workspace:
root: *workspace_root
paths:
- ./

test:
<<: *default_container
<<: *nodejs_container
steps:
- *attach_workspace
- *restore_node_modules
Expand All @@ -70,7 +70,7 @@ jobs:
command: yarn test

build:
<<: *default_container
<<: *nodejs_container
steps:
- *attach_workspace
- *restore_node_modules
Expand All @@ -85,7 +85,7 @@ jobs:
- dist/

deploy:
<<: *default_container
<<: *nodejs_container
steps:
- *attach_workspace
- *restore_node_modules
Expand All @@ -108,26 +108,30 @@ jobs:

- deploy:
name: Deploy to gh-pages branch on GitHub
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
yarn deploy
fi
command: yarn deploy

workflows:
version: 2

build_test_deploy:
push:
jobs:
- install
- checkout

- install:
requires:
- checkout

- test:
requires:
- install

- build:
requires:
- test
- install

- deploy:
requires:
- build
filters:
branches:
only: master
6 changes: 4 additions & 2 deletions README.md
@@ -1,7 +1,9 @@
# template.data.gouv.fr
# template.data.gouv.fr [![CircleCI](https://circleci.com/gh/etalab/template.data.gouv.fr.svg?style=svg)](https://circleci.com/gh/etalab/template.data.gouv.fr)

Template CSS pour data.gouv.fr et compagnie.



## Développement

Pour bénéficier du rechargement automatique du CSS :
Expand All @@ -24,7 +26,7 @@ Installer le package sur votre projet
```bash
npm install template.data.gouv.fr
```

Puis importer le fichier
```
import 'template.data.gouv.fr/dist/style/main.css'
Expand Down

0 comments on commit eb41c89

Please sign in to comment.