Skip to content

Commit

Permalink
👷 Fix: preview alias and commit status (#2831)
Browse files Browse the repository at this point in the history
  • Loading branch information
yanyongyu authored Jul 21, 2024
1 parent 53d8989 commit 87e0d81
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/website-preview-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,12 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}

- name: Restore Context and Set Deploy Name
- name: Restore Context
run: |
cat action.env >> $GITHUB_ENV
- name: Set Deploy Name
run: |
echo "DEPLOY_NAME=deploy-preview-${{ env.PR_NUMBER }}" >> $GITHUB_ENV
- name: Deploy to Netlify
Expand Down Expand Up @@ -74,7 +77,7 @@ jobs:
if: always()
with:
script: |
if (context.job.status === 'success') {
if (`${{ job.status }}` === 'success') {
github.rest.repos.createCommitStatus({
owner: context.repo.owner,
repo: context.repo.repo,
Expand All @@ -90,7 +93,7 @@ jobs:
repo: context.repo.repo,
sha: context.payload.workflow_run.head_sha,
context: 'Website Preview',
description: 'Deploy ' + context.job.status,
description: `Deploy ${{ job.status }}`,
state: 'failure',
})
}

0 comments on commit 87e0d81

Please sign in to comment.