diff --git a/.github/workflows/post-deploy.yml b/.github/workflows/post-deploy.yml index aab0e931..d58eb34a 100644 --- a/.github/workflows/post-deploy.yml +++ b/.github/workflows/post-deploy.yml @@ -9,18 +9,21 @@ jobs: steps: - uses: actions/checkout@v2 with: - fetch-depth: 10 + fetch-depth: 2 - uses: actions/setup-node@v2 with: node-version: 16.x + - run: | + LOWERENV=$(echo "${{ github.event.deployment_status.environment }}" | tr "[:upper:]" "[:lower:]") + echo "NORMALIZED_ENV=${LOWERENV}" >> $GITHUB_ENV - uses: getsentry/action-release@v1 - if: github.event.deployment_status.environment == 'production' + if: ${{ env.NORMALIZED_ENV == 'production' }} env: SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} SENTRY_ORG: jakejarvis SENTRY_PROJECT: jarvis with: - environment: ${{ github.event.deployment_status.environment }} + environment: ${{ env.NORMALIZED_ENV }} - uses: browser-actions/setup-chrome@latest with: chrome-version: stable @@ -30,14 +33,14 @@ jobs: lhci --version curl https://lhci.jrvs.io/version || true echo "ref: ${{ github.event.deployment.ref }}" - echo "env: ${{ github.event.deployment_status.environment }}" + echo "env: ${{ env.NORMALIZED_ENV }}" echo "url: ${{ github.event.deployment_status.target_url }}" - - if: github.event.deployment_status.environment == 'production' + - if: ${{ env.NORMALIZED_ENV == 'production' }} run: | echo "BASE_DEPLOY_URL=https://jarv.is" >> $GITHUB_ENV echo "LHCI_EXTRA_FLAGS=" >> $GITHUB_ENV echo "LHCI_BUILD_CONTEXT__CURRENT_BRANCH=main" >> $GITHUB_ENV - - if: github.event.deployment_status.environment == 'preview' + - if: ${{ env.NORMALIZED_ENV == 'preview' }} run: | echo "BASE_DEPLOY_URL=${{ github.event.deployment_status.target_url }}" >> $GITHUB_ENV echo "LHCI_EXTRA_FLAGS=--assert.assertions.is-crawlable=off --assert.assertions.canonical=off" >> $GITHUB_ENV