From 50e5504f4fe04f42e0c062ba7832401896df9ae5 Mon Sep 17 00:00:00 2001 From: evelyn masso Date: Mon, 15 Feb 2021 13:53:27 -0800 Subject: [PATCH 01/11] move deploy workflow to github actions --- .github/workflows/test.yml | 30 ++++++++++++++++++------------ .travis.yml | 12 ------------ 2 files changed, 18 insertions(+), 24 deletions(-) delete mode 100644 .travis.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ebd18f91fd..4987579b5e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,7 +1,7 @@ # 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: Node.js CI +name: Test (and deploy) on: push: @@ -11,19 +11,25 @@ on: jobs: test: - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [14.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - steps: - uses: actions/checkout@v2 - - name: Use Node.js ${{ matrix.node-version }} + - name: Use Node.js uses: actions/setup-node@v1 with: - node-version: ${{ matrix.node-version }} - - run: npm ci - - run: npm test + node-version: "14.x" + - name: Install node modules + run: npm ci + - name: Run tests + run: npm test + + deploy: + runs-on: ubuntu-latest + needs: test + steps: + - name: Deploy 🚀 + if: github.ref == 'refs/heads/main' # If this is running on the "main" branch + uses: JamesIves/github-pages-deploy-action@4 + with: + branch: gh-pages # The branch the action should deploy to. + folder: dist/ # The folder the action should deploy. diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 35b3cd5383..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: node_js -node_js: - - "lts/*" - -deploy: - provider: pages - skip-cleanup: true - github-token: $GITHUB_TOKEN - keep-history: true - local-dir: dist/ - on: - branch: main From c0f970e7b4d952e34e0dd74119d359b83a19aff9 Mon Sep 17 00:00:00 2001 From: evelyn masso Date: Mon, 15 Feb 2021 13:53:55 -0800 Subject: [PATCH 02/11] rename file --- .github/workflows/{test.yml => test-and-deploy.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{test.yml => test-and-deploy.yml} (100%) diff --git a/.github/workflows/test.yml b/.github/workflows/test-and-deploy.yml similarity index 100% rename from .github/workflows/test.yml rename to .github/workflows/test-and-deploy.yml From 27d170bfd8e78e8fbc8cd5644f84f7a372f5ebc5 Mon Sep 17 00:00:00 2001 From: evelyn masso Date: Mon, 15 Feb 2021 14:01:54 -0800 Subject: [PATCH 03/11] fully specify action version --- .github/workflows/test-and-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-and-deploy.yml b/.github/workflows/test-and-deploy.yml index 4987579b5e..9521ba1154 100644 --- a/.github/workflows/test-and-deploy.yml +++ b/.github/workflows/test-and-deploy.yml @@ -29,7 +29,7 @@ jobs: steps: - name: Deploy 🚀 if: github.ref == 'refs/heads/main' # If this is running on the "main" branch - uses: JamesIves/github-pages-deploy-action@4 + uses: JamesIves/github-pages-deploy-action@4.0.0 with: branch: gh-pages # The branch the action should deploy to. folder: dist/ # The folder the action should deploy. From b9529ce015c0506138b6a4fddce75f21da2081d3 Mon Sep 17 00:00:00 2001 From: evelyn masso Date: Sat, 13 Mar 2021 10:58:10 -0800 Subject: [PATCH 04/11] have to build in deploy job too --- .github/workflows/test-and-deploy.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-and-deploy.yml b/.github/workflows/test-and-deploy.yml index 9521ba1154..b0cf1f2eb8 100644 --- a/.github/workflows/test-and-deploy.yml +++ b/.github/workflows/test-and-deploy.yml @@ -26,9 +26,20 @@ jobs: deploy: runs-on: ubuntu-latest needs: test + if: github.ref == 'refs/heads/main' # If this is running on the "main" branch steps: + # a lot of these steps are duplicates from the above job + # but it feels safer to keep these two jobs separate + - uses: actions/checkout@v2 + - name: Use Node.js + uses: actions/setup-node@v1 + with: + node-version: "14.x" + - name: Install node modules + run: npm ci + - name: Build + run: npm build - name: Deploy 🚀 - if: github.ref == 'refs/heads/main' # If this is running on the "main" branch uses: JamesIves/github-pages-deploy-action@4.0.0 with: branch: gh-pages # The branch the action should deploy to. From f63ef6d3eb6b22208788a6703a92d1dce06f9482 Mon Sep 17 00:00:00 2001 From: evelyn masso Date: Sat, 13 Mar 2021 11:06:19 -0800 Subject: [PATCH 05/11] split test from deploy workflows --- .../{test-and-deploy.yml => deploy.yaml} | 21 +---------------- .github/workflows/test.yml | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+), 20 deletions(-) rename .github/workflows/{test-and-deploy.yml => deploy.yaml} (54%) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test-and-deploy.yml b/.github/workflows/deploy.yaml similarity index 54% rename from .github/workflows/test-and-deploy.yml rename to .github/workflows/deploy.yaml index b0cf1f2eb8..f3c0294cc2 100644 --- a/.github/workflows/test-and-deploy.yml +++ b/.github/workflows/deploy.yaml @@ -1,31 +1,12 @@ -# 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: Test (and deploy) +name: Test and Deploy on: push: branches: [ main ] - pull_request: - branches: [ main ] jobs: - test: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Use Node.js - uses: actions/setup-node@v1 - with: - node-version: "14.x" - - name: Install node modules - run: npm ci - - name: Run tests - run: npm test - deploy: runs-on: ubuntu-latest - needs: test if: github.ref == 'refs/heads/main' # If this is running on the "main" branch steps: # a lot of these steps are duplicates from the above job diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000000..9a36127654 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,23 @@ +# 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: Test + +on: + pull_request: + branches: [ main ] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Use Node.js + uses: actions/setup-node@v1 + with: + node-version: "14.x" + - name: Install node modules + run: npm ci + - name: Run tests + run: npm test + \ No newline at end of file From 417f1a0908ace19691e4a485b3085312f0fa8f93 Mon Sep 17 00:00:00 2001 From: evelyn masso Date: Sat, 13 Mar 2021 11:11:29 -0800 Subject: [PATCH 06/11] better deploy action options --- .github/workflows/deploy.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index f3c0294cc2..a1d9593d3b 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -25,3 +25,5 @@ jobs: with: branch: gh-pages # The branch the action should deploy to. folder: dist/ # The folder the action should deploy. + single-commit: false + clean: false From 26957b4af7b4369ce1f66f4a8e971049f0e088df Mon Sep 17 00:00:00 2001 From: evelyn masso Date: Sat, 13 Mar 2021 11:13:26 -0800 Subject: [PATCH 07/11] cleanup dead code + comments --- .github/workflows/deploy.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index a1d9593d3b..10c63972e0 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -7,10 +7,7 @@ on: jobs: deploy: runs-on: ubuntu-latest - if: github.ref == 'refs/heads/main' # If this is running on the "main" branch steps: - # a lot of these steps are duplicates from the above job - # but it feels safer to keep these two jobs separate - uses: actions/checkout@v2 - name: Use Node.js uses: actions/setup-node@v1 From 5d5f2a07c34f0a63f36bef40cb36dbaa1fc9f5aa Mon Sep 17 00:00:00 2001 From: evelyn masso Date: Sat, 13 Mar 2021 11:14:46 -0800 Subject: [PATCH 08/11] npm *run* build --- .github/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 10c63972e0..3b3d7a3bc8 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -16,7 +16,7 @@ jobs: - name: Install node modules run: npm ci - name: Build - run: npm build + run: npm run build - name: Deploy 🚀 uses: JamesIves/github-pages-deploy-action@4.0.0 with: From 6aa3ba02936ff04beaf6fda863492571ade1e105 Mon Sep 17 00:00:00 2001 From: evelyn masso Date: Sat, 13 Mar 2021 11:19:43 -0800 Subject: [PATCH 09/11] no clean option --- .github/workflows/deploy.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 3b3d7a3bc8..885f455a13 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -23,4 +23,3 @@ jobs: branch: gh-pages # The branch the action should deploy to. folder: dist/ # The folder the action should deploy. single-commit: false - clean: false From 5c7f609327f004c906fd5c78ad3fd4cbe4fde921 Mon Sep 17 00:00:00 2001 From: evelyn masso Date: Sat, 13 Mar 2021 11:31:30 -0800 Subject: [PATCH 10/11] add comment --- .github/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 885f455a13..d162eb1e49 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -22,4 +22,4 @@ jobs: with: branch: gh-pages # The branch the action should deploy to. folder: dist/ # The folder the action should deploy. - single-commit: false + single-commit: false # Preserve git history on the gh-pages branch From 4e17001dc12c649afc3e80abafb14336d8f3b75e Mon Sep 17 00:00:00 2001 From: evelyn masso Date: Sat, 13 Mar 2021 11:39:04 -0800 Subject: [PATCH 11/11] update comment --- .github/workflows/deploy.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index d162eb1e49..b54408558c 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -22,4 +22,4 @@ jobs: with: branch: gh-pages # The branch the action should deploy to. folder: dist/ # The folder the action should deploy. - single-commit: false # Preserve git history on the gh-pages branch + single-commit: false # "false" here means "preserve git history on the gh-pages branch"