diff --git a/.github/workflows/seo-report.yaml b/.github/workflows/seo-report.yaml index 2215589..03e92b8 100644 --- a/.github/workflows/seo-report.yaml +++ b/.github/workflows/seo-report.yaml @@ -17,7 +17,7 @@ jobs: if: github.event.deployment_status.state == 'success' environment: name: github-pages - url: https://${{ github.repository_owner }}.github.io/${{ github.repository }}/${{ github.event.repository.name }}/${{ github.head_ref }} + url: https://${{ github.repository_owner }}.github.io/${{ github.head_ref }}/ runs-on: ubuntu-latest steps: - name: Check out @@ -31,6 +31,16 @@ jobs: - name: Install Dependencies run: yarn global add @unlighthouse/cli puppeteer + - name: Get Deployment Source Branch Name + id: git-branch + run: | + git branch -a --contains ${{ github.event.deployment.ref }} + source_branches="$(git branch -a --contains ${{ github.event.deployment.ref }})" + result=$(echo "$source_branches" | tail -n1 | sed 's/^[ \t]*//') + echo "Remote source of deployment: ${result}" + echo "Local git ref of deployment: ${result#remotes/origin/*}" + echo "SOURCE_REF=${result#remotes/origin/*}" >> "$GITHUB_OUTPUT" + - name: Build Unlighthouse report run: | unlighthouse-ci \