From 7230e08c06e3cf8630af0ba5d6b0cdfb619ad55f Mon Sep 17 00:00:00 2001 From: Peter Kos Date: Thu, 10 Dec 2020 17:57:50 -0500 Subject: [PATCH 1/5] Remove circleci Signed-off-by: Peter Kos --- .circleci/config.yml | 36 ------------------------------------ .circleci/deploy_stage.sh | 3 --- 2 files changed, 39 deletions(-) delete mode 100644 .circleci/config.yml delete mode 100644 .circleci/deploy_stage.sh diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 4b237ecc0..000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,36 +0,0 @@ -version: 2.1 -orbs: - node: circleci/node@3.0.0 - -jobs: - build: - executor: - name: node/default - tag: '13.14' - steps: - - checkout - - node/install-packages - - run: - command: npm run build - deploy-staging: - machine: - enabled: true - steps: - - checkout - - run: - name: Deploy to Staging - command: | - git remote add deploy dokku@csh-cloud.oweb.co:brickhack-stage - git push --force deploy develop:master - no_output_timeout: 1h - -workflows: - build-and-deploy: - jobs: - - build - - deploy-staging: - requires: - - build - filters: - branches: - only: develop diff --git a/.circleci/deploy_stage.sh b/.circleci/deploy_stage.sh deleted file mode 100644 index 8c6d81dd7..000000000 --- a/.circleci/deploy_stage.sh +++ /dev/null @@ -1,3 +0,0 @@ -git remote add deploy dokku@csh-cloud.oweb.co:brickhack-stage -git fetch --unshallow -git push --force deploy develop:master From 209a7dd2664a28c8b975504d41437e5a595e98e7 Mon Sep 17 00:00:00 2001 From: Peter Kos Date: Thu, 10 Dec 2020 17:57:54 -0500 Subject: [PATCH 2/5] Add new deploy script, rename old Signed-off-by: Peter Kos --- .github/workflows/{node.js.yml => build.yml} | 8 ++++---- .github/workflows/deploy-production.yml | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+), 4 deletions(-) rename .github/workflows/{node.js.yml => build.yml} (89%) create mode 100644 .github/workflows/deploy-production.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/build.yml similarity index 89% rename from .github/workflows/node.js.yml rename to .github/workflows/build.yml index 19275d1de..26f6c8d2b 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/build.yml @@ -1,11 +1,11 @@ # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions -name: CI +name: CI - Build -on: - push: - branches: [ develop ] +on: + pull_request: + branches: [ master, develop ] jobs: build: diff --git a/.github/workflows/deploy-production.yml b/.github/workflows/deploy-production.yml new file mode 100644 index 000000000..ce0f5662b --- /dev/null +++ b/.github/workflows/deploy-production.yml @@ -0,0 +1,20 @@ +# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Deploy - Production + +on: + push: master + +jobs: + build: + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Use Node.js 14.x + uses: actions/setup-node@v1 + with: + node-version: 14.x + - run: npm ci + - run: npm run build --if-present From 7570b014e0c97be7d8d015d32ed8fda7fe52e6d8 Mon Sep 17 00:00:00 2001 From: Peter Kos Date: Thu, 10 Dec 2020 18:00:21 -0500 Subject: [PATCH 3/5] Whoops, using proper script Signed-off-by: Peter Kos --- .github/workflows/deploy-production.yml | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy-production.yml b/.github/workflows/deploy-production.yml index ce0f5662b..58b6ebbd0 100644 --- a/.github/workflows/deploy-production.yml +++ b/.github/workflows/deploy-production.yml @@ -7,14 +7,19 @@ on: push: master jobs: - build: - + deploy-production: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Use Node.js 14.x - uses: actions/setup-node@v1 with: - node-version: 14.x - - run: npm ci - - run: npm run build --if-present + ref: master + - run: node --version + - name: Install dependencies + run: npm ci + - name: Builder + run: npm run build + - name: Deployyyyy + uses: peaceiris/actions-gh-pages@v3 + with: + publish_dir: ./build + allow_empty_commit: true From 64c3ff44afc5918886be124dbb70298e9975566b Mon Sep 17 00:00:00 2001 From: Peter Kos Date: Thu, 10 Dec 2020 18:02:49 -0500 Subject: [PATCH 4/5] Add github token Signed-off-by: Peter Kos --- .github/workflows/deploy-production.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy-production.yml b/.github/workflows/deploy-production.yml index 58b6ebbd0..d3c4d3aba 100644 --- a/.github/workflows/deploy-production.yml +++ b/.github/workflows/deploy-production.yml @@ -21,5 +21,6 @@ jobs: - name: Deployyyyy uses: peaceiris/actions-gh-pages@v3 with: + github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./build allow_empty_commit: true From 5d4dde257aee56568de6650615bb8fc8c575bdd3 Mon Sep 17 00:00:00 2001 From: Peter Kos Date: Thu, 10 Dec 2020 18:16:07 -0500 Subject: [PATCH 5/5] Rename deploy name Signed-off-by: Peter Kos --- .github/workflows/deploy-production.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-production.yml b/.github/workflows/deploy-production.yml index d3c4d3aba..ab459af85 100644 --- a/.github/workflows/deploy-production.yml +++ b/.github/workflows/deploy-production.yml @@ -18,7 +18,7 @@ jobs: run: npm ci - name: Builder run: npm run build - - name: Deployyyyy + - name: Deploy uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }}