From 941c64aecf12d18cbc1ce0156c4743871ff6999f Mon Sep 17 00:00:00 2001 From: rrigato Date: Sun, 17 Sep 2023 12:16:56 -0500 Subject: [PATCH 1/8] update build pipeline --- .../{favicon_update.yml => homepage_update.yml} | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) rename .github/workflows/{favicon_update.yml => homepage_update.yml} (67%) diff --git a/.github/workflows/favicon_update.yml b/.github/workflows/homepage_update.yml similarity index 67% rename from .github/workflows/favicon_update.yml rename to .github/workflows/homepage_update.yml index 30744ae..1d1eef3 100644 --- a/.github/workflows/favicon_update.yml +++ b/.github/workflows/homepage_update.yml @@ -1,4 +1,4 @@ -name: Add favicon images to web application +name: Updates web application on: push: branches: @@ -7,6 +7,7 @@ on: jobs: publish-commit-artifact: runs-on: ubuntu-latest + name: favicon to s3 bucket env: ORCHESTRATION_SCRIPT: './.github/scripts/orchestrate_artifacts.sh' @@ -27,3 +28,16 @@ jobs: AWS_SECRET_ACCESS_KEY: ${{secrets.PERSISTANT_STORAGE_KEY}} run: ${{env.ORCHESTRATION_SCRIPT}} + + deploy-website-source-files: + runs-on: ubuntu-latest + name: web source file upload to s3 bucket + steps: + - name: checkout-current-branch + uses: actions/checkout@v3 + + - uses: actions/setup-node@v3 + with: + node-version: 18 + - run: npm run test + From 8a482cadb82c820360063d23d5b2ce73b672128f Mon Sep 17 00:00:00 2001 From: rrigato Date: Sun, 17 Sep 2023 12:24:38 -0500 Subject: [PATCH 2/8] test dev branch workflow --- .github/workflows/homepage_update.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/homepage_update.yml b/.github/workflows/homepage_update.yml index 1d1eef3..77d3ff6 100644 --- a/.github/workflows/homepage_update.yml +++ b/.github/workflows/homepage_update.yml @@ -3,6 +3,7 @@ on: push: branches: - master + - dev jobs: publish-commit-artifact: @@ -41,3 +42,5 @@ jobs: node-version: 18 - run: npm run test + - run: npm run build + From 620c12a5cf610fa95210e3658b0a6b130260c6d8 Mon Sep 17 00:00:00 2001 From: rrigato Date: Sun, 17 Sep 2023 12:28:54 -0500 Subject: [PATCH 3/8] correct directory --- .github/workflows/homepage_update.yml | 2 ++ static/webpack.local.js | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/.github/workflows/homepage_update.yml b/.github/workflows/homepage_update.yml index 77d3ff6..b8f9fa2 100644 --- a/.github/workflows/homepage_update.yml +++ b/.github/workflows/homepage_update.yml @@ -40,6 +40,8 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 18 + - run: cd static + - run: npm run test - run: npm run build diff --git a/static/webpack.local.js b/static/webpack.local.js index e0864d6..b1b7f5c 100644 --- a/static/webpack.local.js +++ b/static/webpack.local.js @@ -3,7 +3,14 @@ const baseConfig = require('./webpack.config.js'); module.exports = merge( baseConfig, + { + devServer: { + static: { + directory: path.join(__dirname, 'dist'), + }, + open: true + }, mode: 'development' } ); From 6f3e494a508f5c6c9a4066aa100dac926d5c0807 Mon Sep 17 00:00:00 2001 From: rrigato Date: Sun, 17 Sep 2023 12:33:17 -0500 Subject: [PATCH 4/8] local config working --- .github/workflows/homepage_update.yml | 2 ++ static/webpack.local.js | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/homepage_update.yml b/.github/workflows/homepage_update.yml index b8f9fa2..192ae13 100644 --- a/.github/workflows/homepage_update.yml +++ b/.github/workflows/homepage_update.yml @@ -42,6 +42,8 @@ jobs: node-version: 18 - run: cd static + - run: npm install + - run: npm run test - run: npm run build diff --git a/static/webpack.local.js b/static/webpack.local.js index b1b7f5c..9dd0f31 100644 --- a/static/webpack.local.js +++ b/static/webpack.local.js @@ -1,5 +1,6 @@ const { merge } = require('webpack-merge'); const baseConfig = require('./webpack.config.js'); +const path = require('path'); module.exports = merge( baseConfig, @@ -7,7 +8,8 @@ module.exports = merge( { devServer: { static: { - directory: path.join(__dirname, 'dist'), + directory: path.join( + __dirname, 'static', 'dist'), }, open: true }, From 8703550634f745465f00738d50d7d546777cab7f Mon Sep 17 00:00:00 2001 From: rrigato Date: Sun, 17 Sep 2023 12:40:51 -0500 Subject: [PATCH 5/8] set default directory --- .github/workflows/homepage_update.yml | 4 ++++ static/webpack.local.js | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/homepage_update.yml b/.github/workflows/homepage_update.yml index 192ae13..2cb3e18 100644 --- a/.github/workflows/homepage_update.yml +++ b/.github/workflows/homepage_update.yml @@ -33,6 +33,9 @@ jobs: deploy-website-source-files: runs-on: ubuntu-latest name: web source file upload to s3 bucket + defaults: + run: + working-directory: ./static steps: - name: checkout-current-branch uses: actions/checkout@v3 @@ -40,6 +43,7 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 18 + - run: cd static - run: npm install diff --git a/static/webpack.local.js b/static/webpack.local.js index 9dd0f31..eddff54 100644 --- a/static/webpack.local.js +++ b/static/webpack.local.js @@ -7,10 +7,6 @@ module.exports = merge( { devServer: { - static: { - directory: path.join( - __dirname, 'static', 'dist'), - }, open: true }, mode: 'development' From dc9a71e420af85e6a8b94e7f82a6c8fe52a02b78 Mon Sep 17 00:00:00 2001 From: rrigato Date: Sun, 17 Sep 2023 12:43:22 -0500 Subject: [PATCH 6/8] remove static --- .github/workflows/homepage_update.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/homepage_update.yml b/.github/workflows/homepage_update.yml index 2cb3e18..c51f71e 100644 --- a/.github/workflows/homepage_update.yml +++ b/.github/workflows/homepage_update.yml @@ -43,8 +43,6 @@ jobs: - uses: actions/setup-node@v3 with: node-version: 18 - - - run: cd static - run: npm install From 005af4722952f3d0c31b968d8c663bda5c25b6a8 Mon Sep 17 00:00:00 2001 From: rrigato Date: Sun, 17 Sep 2023 12:45:13 -0500 Subject: [PATCH 7/8] remove dev trigger --- .github/workflows/homepage_update.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/homepage_update.yml b/.github/workflows/homepage_update.yml index c51f71e..c1f62e6 100644 --- a/.github/workflows/homepage_update.yml +++ b/.github/workflows/homepage_update.yml @@ -3,7 +3,6 @@ on: push: branches: - master - - dev jobs: publish-commit-artifact: From d313da93dfcc71d45a2738adc06fd0333f076cdb Mon Sep 17 00:00:00 2001 From: rrigato Date: Sun, 17 Sep 2023 12:46:44 -0500 Subject: [PATCH 8/8] name of step --- .github/workflows/homepage_update.yml | 2 +- static/webpack.local.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/homepage_update.yml b/.github/workflows/homepage_update.yml index c1f62e6..737ad34 100644 --- a/.github/workflows/homepage_update.yml +++ b/.github/workflows/homepage_update.yml @@ -31,7 +31,7 @@ jobs: deploy-website-source-files: runs-on: ubuntu-latest - name: web source file upload to s3 bucket + name: web source files to s3 defaults: run: working-directory: ./static diff --git a/static/webpack.local.js b/static/webpack.local.js index eddff54..41b435f 100644 --- a/static/webpack.local.js +++ b/static/webpack.local.js @@ -1,6 +1,5 @@ const { merge } = require('webpack-merge'); const baseConfig = require('./webpack.config.js'); -const path = require('path'); module.exports = merge( baseConfig,