From eb41c89509d53efe87c212295711f2a5b5e658ca Mon Sep 17 00:00:00 2001 From: Bertrand Marron Date: Mon, 6 Aug 2018 11:32:26 +0200 Subject: [PATCH] Update circleci configuration Add badge to readme. --- .circleci/config.yml | 52 ++++++++++++++++++++++++-------------------- README.md | 6 +++-- 2 files changed, 32 insertions(+), 26 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 686875a..6182aea 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 @@ -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 @@ -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 @@ -70,7 +70,7 @@ jobs: command: yarn test build: - <<: *default_container + <<: *nodejs_container steps: - *attach_workspace - *restore_node_modules @@ -85,7 +85,7 @@ jobs: - dist/ deploy: - <<: *default_container + <<: *nodejs_container steps: - *attach_workspace - *restore_node_modules @@ -108,17 +108,18 @@ 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: @@ -126,8 +127,11 @@ workflows: - build: requires: - - test + - install - deploy: requires: - build + filters: + branches: + only: master diff --git a/README.md b/README.md index 75258de..808cb3c 100644 --- a/README.md +++ b/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 : @@ -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'