mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-24 00:55:07 +08:00
👷 Fix: preview alias and commit status (#2831)
This commit is contained in:
parent
53d8989145
commit
87e0d8148f
9
.github/workflows/website-preview-cd.yml
vendored
9
.github/workflows/website-preview-cd.yml
vendored
@ -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
|
||||
@ -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,
|
||||
@ -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',
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user