diff --git a/.github/workflows/percy-on-demand.yml b/.github/workflows/percy-on-demand.yml index 7a467dd..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"] }} + 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"] }} + PERCY_TOKEN: ${{ secrets.PERCY_TOKEN_SITE2 }} diff --git a/.github/workflows/percy.yml b/.github/workflows/percy.yml index 857abf9..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 @@ -26,8 +22,21 @@ 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 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? + - 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 + sha: ${{github.event.deployment.sha}} 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.