mirror of
https://github.com/bartvdbraak/omnidash.git
synced 2025-05-02 09:51:20 +00:00
debug: Return to git commands before checkout
This commit is contained in:
parent
7772c6367e
commit
bb718525ef
1 changed files with 10 additions and 12 deletions
22
.github/workflows/seo-report.yaml
vendored
22
.github/workflows/seo-report.yaml
vendored
|
@ -20,6 +20,16 @@ jobs:
|
|||
url: https://${{ github.repository_owner }}.github.io/${{ github.head_ref }}/
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- 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: Check out
|
||||
uses: actions/checkout@v3
|
||||
|
||||
|
@ -31,18 +41,6 @@ jobs:
|
|||
- name: Install Dependencies
|
||||
run: yarn global add @unlighthouse/cli puppeteer
|
||||
|
||||
- name: Get Deployment Source Branch Name
|
||||
id: git-branch
|
||||
run: |
|
||||
commit_sha=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
|
||||
"https://api.github.com/repos/${{ github.repository }}/deployments/${{ github.event.deployment.id }}" \
|
||||
| jq -r '.sha')
|
||||
branch=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
|
||||
"https://api.github.com/repos/${{ github.repository }}/commits/$commit_sha" \
|
||||
| jq -r '.ref' | sed 's/refs\/heads\///')
|
||||
echo "Source branch of deployment: $branch"
|
||||
echo "SOURCE_REF=$branch" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Build Unlighthouse report
|
||||
run: |
|
||||
unlighthouse-ci \
|
||||
|
|
Loading…
Reference in a new issue