From 131a5293e0aeaf35804798b1fc00909ed5f7ef07 Mon Sep 17 00:00:00 2001 From: Nathan Seymour Date: Wed, 29 May 2024 15:07:01 -0500 Subject: [PATCH 1/9] Create frontend-ci.yml --- .github/workflows/frontend-ci.yml | 33 +++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/frontend-ci.yml diff --git a/.github/workflows/frontend-ci.yml b/.github/workflows/frontend-ci.yml new file mode 100644 index 0000000..5b8b731 --- /dev/null +++ b/.github/workflows/frontend-ci.yml @@ -0,0 +1,33 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: Frontend CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm test + - name: Deploy to Pages + uses: actions/deploy-pages@v4 From a9ba0a1909be0a8202b81b65fc1a031f899400ac Mon Sep 17 00:00:00 2001 From: Nathan Seymour Date: Wed, 29 May 2024 15:13:37 -0500 Subject: [PATCH 2/9] Update frontend-ci.yml --- .github/workflows/frontend-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/frontend-ci.yml b/.github/workflows/frontend-ci.yml index 5b8b731..58c06a4 100644 --- a/.github/workflows/frontend-ci.yml +++ b/.github/workflows/frontend-ci.yml @@ -11,9 +11,10 @@ on: jobs: build: - runs-on: ubuntu-latest - + defaults: + run: + working-directory: ./frontend strategy: matrix: node-version: [18.x] From 39c35eabe43b5e9bec2afb552de9044d9c1eeff1 Mon Sep 17 00:00:00 2001 From: Nathan Seymour Date: Wed, 29 May 2024 15:14:53 -0500 Subject: [PATCH 3/9] Update frontend-ci.yml --- .github/workflows/frontend-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/frontend-ci.yml b/.github/workflows/frontend-ci.yml index 58c06a4..d38ca51 100644 --- a/.github/workflows/frontend-ci.yml +++ b/.github/workflows/frontend-ci.yml @@ -25,6 +25,7 @@ jobs: - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: + working-directory: ./frontend node-version: ${{ matrix.node-version }} cache: 'npm' - run: npm ci @@ -32,3 +33,5 @@ jobs: - run: npm test - name: Deploy to Pages uses: actions/deploy-pages@v4 + with: + working-directory: ./frontend From 12f0b6fd82c50f4511ab09cbc60ea7e139856aef Mon Sep 17 00:00:00 2001 From: Nathan Seymour Date: Wed, 29 May 2024 15:17:05 -0500 Subject: [PATCH 4/9] Update frontend-ci.yml --- .github/workflows/frontend-ci.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/frontend-ci.yml b/.github/workflows/frontend-ci.yml index d38ca51..d2e0553 100644 --- a/.github/workflows/frontend-ci.yml +++ b/.github/workflows/frontend-ci.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest defaults: run: - working-directory: ./frontend + working-directory: frontend strategy: matrix: node-version: [18.x] @@ -25,7 +25,6 @@ jobs: - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: - working-directory: ./frontend node-version: ${{ matrix.node-version }} cache: 'npm' - run: npm ci @@ -33,5 +32,3 @@ jobs: - run: npm test - name: Deploy to Pages uses: actions/deploy-pages@v4 - with: - working-directory: ./frontend From 02074c13910a4229ba17ae468adb58885f3aeeec Mon Sep 17 00:00:00 2001 From: Nathan Seymour Date: Wed, 29 May 2024 15:18:59 -0500 Subject: [PATCH 5/9] Update frontend-ci.yml --- .github/workflows/frontend-ci.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/frontend-ci.yml b/.github/workflows/frontend-ci.yml index d2e0553..c7d3480 100644 --- a/.github/workflows/frontend-ci.yml +++ b/.github/workflows/frontend-ci.yml @@ -15,18 +15,12 @@ jobs: defaults: run: working-directory: frontend - strategy: - matrix: - node-version: [18.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - steps: - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: - node-version: ${{ matrix.node-version }} - cache: 'npm' + node-version: 18.x - run: npm ci - run: npm run build --if-present - run: npm test From 6ff029035ca860e2da4a46beb01b69ed6449ec3f Mon Sep 17 00:00:00 2001 From: Nathan Seymour Date: Wed, 29 May 2024 15:19:49 -0500 Subject: [PATCH 6/9] Update frontend-ci.yml --- .github/workflows/frontend-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/frontend-ci.yml b/.github/workflows/frontend-ci.yml index c7d3480..5bd2d05 100644 --- a/.github/workflows/frontend-ci.yml +++ b/.github/workflows/frontend-ci.yml @@ -23,6 +23,6 @@ jobs: node-version: 18.x - run: npm ci - run: npm run build --if-present - - run: npm test + - run: npm test --if-present - name: Deploy to Pages uses: actions/deploy-pages@v4 From 339da3f4596d24fb12e783f8ffd50ad817db2c84 Mon Sep 17 00:00:00 2001 From: Nathan Seymour Date: Wed, 29 May 2024 15:20:38 -0500 Subject: [PATCH 7/9] Update frontend-ci.yml --- .github/workflows/frontend-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/frontend-ci.yml b/.github/workflows/frontend-ci.yml index 5bd2d05..85a6747 100644 --- a/.github/workflows/frontend-ci.yml +++ b/.github/workflows/frontend-ci.yml @@ -21,6 +21,8 @@ jobs: uses: actions/setup-node@v3 with: node-version: 18.x + cache: 'npm' + cache-dependency-path: frontend/package-lock.json - run: npm ci - run: npm run build --if-present - run: npm test --if-present From 4182ea9170f170be193debb3d8e77037c312c061 Mon Sep 17 00:00:00 2001 From: Nathan Seymour Date: Wed, 29 May 2024 15:27:14 -0500 Subject: [PATCH 8/9] Update frontend-ci.yml --- .github/workflows/frontend-ci.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/frontend-ci.yml b/.github/workflows/frontend-ci.yml index 85a6747..7970f39 100644 --- a/.github/workflows/frontend-ci.yml +++ b/.github/workflows/frontend-ci.yml @@ -26,5 +26,17 @@ jobs: - run: npm ci - run: npm run build --if-present - run: npm test --if-present - - name: Deploy to Pages - uses: actions/deploy-pages@v4 + - name: Upload Artifact + uses: actions/upload-pages-artifact@v3 + with: + path: frontend + deploy: + runs-on: ubuntu-latest + needs: build + permissions: + pages: write + id-token: write + steps: + - name: Deploy to Pages + id: deployment + uses: actions/deploy-pages@v4 From 0c726f3bb7790a5d015067f1c0ef3ba82ff7470e Mon Sep 17 00:00:00 2001 From: Nathan Seymour Date: Wed, 29 May 2024 15:29:48 -0500 Subject: [PATCH 9/9] Update frontend-ci.yml --- .github/workflows/frontend-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/frontend-ci.yml b/.github/workflows/frontend-ci.yml index 7970f39..91ce5cf 100644 --- a/.github/workflows/frontend-ci.yml +++ b/.github/workflows/frontend-ci.yml @@ -29,7 +29,7 @@ jobs: - name: Upload Artifact uses: actions/upload-pages-artifact@v3 with: - path: frontend + path: frontend/dist deploy: runs-on: ubuntu-latest needs: build