From fdd2efbcdc0008856165bf0bb4922a9420b2f5f1 Mon Sep 17 00:00:00 2001 From: Eric RENARD Date: Tue, 23 Jul 2019 14:09:29 +0200 Subject: [PATCH] Refactor the CI build script. # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # On branch master # Your branch is up to date with 'origin/master'. # # Changes to be committed: # modified: .circleci/config.yml # modified: package.json # --- .circleci/config.yml | 22 ++++++++++++---------- package.json | 3 +-- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 35d1df7..e93cf9c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -29,22 +29,24 @@ jobs: paths: - node_modules key: v1-dependencies-{{ checksum "package.json" }} - # run tests! + # Test - run: npm run test:unit - - run: git config --global -l #<= totally unnecessary, but "fixes" problem? - - run: git config --global user.email circleci@circleci - - run: git config --global user.name CircleCI + # Build + - run: npm run build + # Deploy - add_ssh_keys: fingerprints: - "00:4f:8a:aa:1c:9e:03:b5:d5:44:69:71:53:31:f3:8b" - - run: npm run build - - run: cp -R .circleci dist - - run: + - run: + name: Prevent building the gh-pages branche + command: cp -R .circleci dist + - run: working_directory: ~/erenard/reversi/dist command: | + git config --global -l + git config --global user.email circleci@circleci + git config --global user.name CircleCI git init git add --all git commit -m "Release at $(date)" - # - run: - # command: git push -f git@github.com:erenard/reversi.git master:gh-pages - # working_directory: ~/erenard/reversi/dist + git push -f git@github.com:erenard/reversi.git master:gh-pages diff --git a/package.json b/package.json index e91fb35..944aaf6 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,7 @@ "serve": "vue-cli-service serve", "build": "vue-cli-service build", "lint": "vue-cli-service lint", - "test:unit": "vue-cli-service test:unit", - "deploy": "cd dist && git init && git add --all && git commit -m \"Release at $(date)\" && git push -f git@github.com:erenard/reversi.git master:gh-pages" + "test:unit": "vue-cli-service test:unit" }, "dependencies": { "core-js": "^2.6.9",