mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-28 03:46:54 +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 }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run-id: ${{ github.event.workflow_run.id }}
|
run-id: ${{ github.event.workflow_run.id }}
|
||||||
|
|
||||||
- name: Restore Context and Set Deploy Name
|
- name: Restore Context
|
||||||
run: |
|
run: |
|
||||||
cat action.env >> $GITHUB_ENV
|
cat action.env >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Set Deploy Name
|
||||||
|
run: |
|
||||||
echo "DEPLOY_NAME=deploy-preview-${{ env.PR_NUMBER }}" >> $GITHUB_ENV
|
echo "DEPLOY_NAME=deploy-preview-${{ env.PR_NUMBER }}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Deploy to Netlify
|
- name: Deploy to Netlify
|
||||||
@ -74,7 +77,7 @@ jobs:
|
|||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
if (context.job.status === 'success') {
|
if (`${{ job.status }}` === 'success') {
|
||||||
github.rest.repos.createCommitStatus({
|
github.rest.repos.createCommitStatus({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
@ -90,7 +93,7 @@ jobs:
|
|||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
sha: context.payload.workflow_run.head_sha,
|
sha: context.payload.workflow_run.head_sha,
|
||||||
context: 'Website Preview',
|
context: 'Website Preview',
|
||||||
description: 'Deploy ' + context.job.status,
|
description: `Deploy ${{ job.status }}`,
|
||||||
state: 'failure',
|
state: 'failure',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user