From adf0c7735b4643e826d7e70379765e0dd2b21019 Mon Sep 17 00:00:00 2001 From: Nathan Morris Date: Thu, 19 Dec 2024 13:14:33 -0600 Subject: [PATCH 01/10] fix: secrets reference --- .github/workflows/percy-on-demand.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/percy-on-demand.yml b/.github/workflows/percy-on-demand.yml index 7a467dd..636ded9 100644 --- a/.github/workflows/percy-on-demand.yml +++ b/.github/workflows/percy-on-demand.yml @@ -19,10 +19,10 @@ jobs: cd packages/site1 percy snapshot --base-url https://site1-uwh-deploy-test.netlify.app snaplist.yml env: - PERCY_TOKEN: ${{ secrets["PERCY_TOKEN_site1"] }} + PERCY_TOKEN: ${{ secrets[PERCY_TOKEN_site1] }} - name: Run Percy check site2 run: | cd packages/site2 percy snapshot --base-url https://site2-uwh-deploy-test.netlify.app snaplist.yml env: - PERCY_TOKEN: ${{ secrets["PERCY_TOKEN_site2"] }} + PERCY_TOKEN: ${{ secrets[PERCY_TOKEN_site2] }} From 4e65bf55f6f2a59dfd66f974b4e08e5863fe47a1 Mon Sep 17 00:00:00 2001 From: Nathan Morris Date: Thu, 19 Dec 2024 13:16:05 -0600 Subject: [PATCH 02/10] fix --- .github/workflows/percy-on-demand.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/percy-on-demand.yml b/.github/workflows/percy-on-demand.yml index 636ded9..34336c8 100644 --- a/.github/workflows/percy-on-demand.yml +++ b/.github/workflows/percy-on-demand.yml @@ -19,10 +19,10 @@ jobs: cd packages/site1 percy snapshot --base-url https://site1-uwh-deploy-test.netlify.app snaplist.yml env: - PERCY_TOKEN: ${{ secrets[PERCY_TOKEN_site1] }} + PERCY_TOKEN: ${{ secrets.PERCY_TOKEN_SITE1 }} - name: Run Percy check site2 run: | cd packages/site2 percy snapshot --base-url https://site2-uwh-deploy-test.netlify.app snaplist.yml env: - PERCY_TOKEN: ${{ secrets[PERCY_TOKEN_site2] }} + PERCY_TOKEN: ${{ secrets.PERCY_TOKEN_SITE2 }} From 8cafe7a4a981fd45e5217be65f1b93ea366270a9 Mon Sep 17 00:00:00 2001 From: Nathan Morris Date: Thu, 19 Dec 2024 13:18:45 -0600 Subject: [PATCH 03/10] fix --- .github/workflows/percy-on-demand.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/percy-on-demand.yml b/.github/workflows/percy-on-demand.yml index 34336c8..7869181 100644 --- a/.github/workflows/percy-on-demand.yml +++ b/.github/workflows/percy-on-demand.yml @@ -17,12 +17,12 @@ jobs: - name: Run Percy check site1 run: | cd packages/site1 - percy snapshot --base-url https://site1-uwh-deploy-test.netlify.app snaplist.yml + PERCY_BRANCH=develop percy snapshot --base-url https://site1-uwh-deploy-test.netlify.app snaplist.yml env: PERCY_TOKEN: ${{ secrets.PERCY_TOKEN_SITE1 }} - name: Run Percy check site2 run: | cd packages/site2 - percy snapshot --base-url https://site2-uwh-deploy-test.netlify.app snaplist.yml + PERCY_BRANCH=develop percy snapshot --base-url https://site2-uwh-deploy-test.netlify.app snaplist.yml env: PERCY_TOKEN: ${{ secrets.PERCY_TOKEN_SITE2 }} From 83548cc16ef290888aaae88b893830c9b58a3fd3 Mon Sep 17 00:00:00 2001 From: Nathan Morris Date: Thu, 19 Dec 2024 18:17:07 -0600 Subject: [PATCH 04/10] a noop change --- common.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common.md b/common.md index 5d29cdf..f5085b5 100644 --- a/common.md +++ b/common.md @@ -1,4 +1,5 @@ # Shared file to test changes Will this trigger both sites? -update all builds again \ No newline at end of file +update all builds again +nothing should build as I commit this. From 4b0318da8cf9e38fb4583352e842aa9338b194b0 Mon Sep 17 00:00:00 2001 From: Nathan Morris Date: Thu, 19 Dec 2024 19:29:32 -0600 Subject: [PATCH 05/10] fix: no environment url --- .github/workflows/percy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/percy.yml b/.github/workflows/percy.yml index 857abf9..4a56d0f 100644 --- a/.github/workflows/percy.yml +++ b/.github/workflows/percy.yml @@ -26,6 +26,7 @@ jobs: echo "site=$SITE" >> $GITHUB_ENV echo "PERCY_TOKEN_NAME=PERCY_TOKEN_$SITE" >> $GITHUB_ENV - name: Run Percy check + if: ${{ github.event.deployment_status.environment_url }} run: | cd packages/${{ env.site }} percy snapshot --base-url ${{ github.event.deployment_status.environment_url }} snaplist.yml From f20e89c5b8911665d756559734a356713737a2bd Mon Sep 17 00:00:00 2001 From: Nathan Morris Date: Thu, 19 Dec 2024 19:38:33 -0600 Subject: [PATCH 06/10] comment --- .github/workflows/percy.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/percy.yml b/.github/workflows/percy.yml index 4a56d0f..832eb1b 100644 --- a/.github/workflows/percy.yml +++ b/.github/workflows/percy.yml @@ -32,3 +32,7 @@ jobs: percy snapshot --base-url ${{ github.event.deployment_status.environment_url }} snaplist.yml env: PERCY_TOKEN: ${{ secrets[env.PERCY_TOKEN_NAME] }} + # if no github.event.deployment_status.environment_url, that means deploy was successful because there were + # no code changes and no actual deployment made. + # instead create a fake success status with the same name as the percy app? + # percy/Site-1 From 9948438bc3318db6b289141952f2301f4631aa65 Mon Sep 17 00:00:00 2001 From: Nathan Morris Date: Fri, 20 Dec 2024 15:04:02 -0600 Subject: [PATCH 07/10] feat: placeholder status --- .github/workflows/percy.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/percy.yml b/.github/workflows/percy.yml index 832eb1b..89d50c7 100644 --- a/.github/workflows/percy.yml +++ b/.github/workflows/percy.yml @@ -36,3 +36,11 @@ jobs: # no code changes and no actual deployment made. # instead create a fake success status with the same name as the percy app? # percy/Site-1 + - name: No Deployment Changes, set fuax status + uses: myrotvorets/set-commit-status-action@master + if: ${{ !github.event.deployment_status.environment_url }} + with: + token: ${{ secrets.GITHUB_TOKEN }} + status: success + context: Percy/${{ github.event.deployment_status.environment }} + description: Visual check not needed, no deployment changes From cb878f2f4e41e833d9be0cc2e0e1a6e7040a22ec Mon Sep 17 00:00:00 2001 From: Nathan Morris Date: Fri, 20 Dec 2024 15:25:52 -0600 Subject: [PATCH 08/10] fix: set sha for deploy satus --- .github/workflows/percy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/percy.yml b/.github/workflows/percy.yml index 89d50c7..d6105fd 100644 --- a/.github/workflows/percy.yml +++ b/.github/workflows/percy.yml @@ -44,3 +44,4 @@ jobs: status: success context: Percy/${{ github.event.deployment_status.environment }} description: Visual check not needed, no deployment changes + sha: ${{github.event.deployment_status.sha}} From 11c7c72cd6e3ccf6266ea6d78a19720c33b062d3 Mon Sep 17 00:00:00 2001 From: Nathan Morris Date: Fri, 20 Dec 2024 15:30:29 -0600 Subject: [PATCH 09/10] fix: sha --- .github/workflows/percy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/percy.yml b/.github/workflows/percy.yml index d6105fd..0ef7138 100644 --- a/.github/workflows/percy.yml +++ b/.github/workflows/percy.yml @@ -44,4 +44,4 @@ jobs: status: success context: Percy/${{ github.event.deployment_status.environment }} description: Visual check not needed, no deployment changes - sha: ${{github.event.deployment_status.sha}} + sha: ${{github.event.deployment.sha}} From af08b7c5958e091ee7975839b784f23165355dc1 Mon Sep 17 00:00:00 2001 From: Nathan Morris Date: Fri, 20 Dec 2024 15:40:01 -0600 Subject: [PATCH 10/10] fix: sha --- .github/workflows/percy.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/percy.yml b/.github/workflows/percy.yml index 0ef7138..b0a810b 100644 --- a/.github/workflows/percy.yml +++ b/.github/workflows/percy.yml @@ -3,10 +3,6 @@ name: Percy Check on: deployment_status -# concurrency: -# group: ci-tests-${{ github.workflow }}-${{ github.event.deployment_status.environment }}-${{ github.ref }}-1 -# cancel-in-progress: true - jobs: percy-check: runs-on: ubuntu-latest @@ -35,13 +31,12 @@ jobs: # if no github.event.deployment_status.environment_url, that means deploy was successful because there were # no code changes and no actual deployment made. # instead create a fake success status with the same name as the percy app? - # percy/Site-1 - name: No Deployment Changes, set fuax status uses: myrotvorets/set-commit-status-action@master if: ${{ !github.event.deployment_status.environment_url }} with: token: ${{ secrets.GITHUB_TOKEN }} status: success - context: Percy/${{ github.event.deployment_status.environment }} + context: percy/${{ github.event.deployment_status.environment }} description: Visual check not needed, no deployment changes sha: ${{github.event.deployment.sha}}