From 55a5f04923b18ae493c1954475d1344527e23a10 Mon Sep 17 00:00:00 2001 From: Danny Brown Date: Thu, 14 Nov 2019 16:20:31 -0500 Subject: [PATCH] Ci/promotable builds (#1184) * ci: don't build our master branch * Add netlify-cli as a dev dependency * ci: trying a sheltered merge flow for promotions * ci: try building with QUICK_BUILD flag * Try using ~/repo prefix in command * ci: make sure netlify command is available * ci: use sudo for global command * Inline personal access token w/ env var * ci: workaround for sudo limitations --- .circleci/config.yml | 7 +++---- .netlify/package.json | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 .netlify/package.json diff --git a/.circleci/config.yml b/.circleci/config.yml index bc3c4994f..cb30ba99b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -168,6 +168,7 @@ jobs: paths: - platform/viewer/dist - netlify.toml + - .netlify DEPLOY_TO_DEV: docker: @@ -179,10 +180,8 @@ jobs: steps: - attach_workspace: at: ~/repo - - run: sudo npm install netlify-cli -g - - run: - sudo npx netlify deploy --prod --auth $NETLIFY_AUTH_TOKEN --dir - platform/viewer/dist + - run: cd .netlify && npm install + - run: cd .netlify && npm run deploy DEPLOY_TO_STAGING: docker: diff --git a/.netlify/package.json b/.netlify/package.json new file mode 100644 index 000000000..362237524 --- /dev/null +++ b/.netlify/package.json @@ -0,0 +1,15 @@ +{ + "name": "root", + "private": true, + "engines": { + "node": ">=10", + "npm": ">=6", + "yarn": ">=1.16.0" + }, + "scripts": { + "deploy": "netlify deploy --prod --dir ./../platform/viewer/dist" + }, + "devDependencies": { + "netlify-cli": "^2.21.0" + } +}