Skip to content

Commit 99d0e64

Browse files
committed
solve more comments
1 parent b7b1e62 commit 99d0e64

4 files changed

Lines changed: 4 additions & 7 deletions

File tree

.github/actions/deploy-vercel-preview/action.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ name: Deploy Vercel preview
33
description: Build and deploy a preview to Vercel
44

55
inputs:
6-
ref:
7-
description: Git ref (caller should checkout; optional)
8-
required: false
96
github-token:
107
description: GitHub token used by Vercel action to comment on PRs
118
required: true
@@ -30,6 +27,7 @@ runs:
3027
using: composite
3128
steps:
3229
- name: Prepare build command for preview
30+
working-directory: ${{ inputs.working-directory }}
3331
run: |
3432
sed -i 's/yarn vercel-build/yarn vercel-preview-build/' vercel.json
3533
shell: bash

.github/workflows/deploy-fork-pr-preview.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ jobs:
5252
core.setOutput('pr_number', String(prNumber));
5353
- uses: actions/checkout@v6
5454
with:
55+
ref: ${{ steps.pr.outputs.merge_ref }}
5556
persist-credentials: false
5657

5758
- uses: ./.github/actions/deploy-vercel-preview
@@ -61,5 +62,4 @@ jobs:
6162
vercel-org-id: ${{ secrets.MISTICA_WEB_VERCEL_ORG_ID }}
6263
vercel-project-id: ${{ secrets.MISTICA_WEB_VERCEL_PROJECT_ID }}
6364
vercel-project-name: mistica-web
64-
ref: ${{ steps.pr.outputs.merge_ref }}
6565
working-directory: ${{ github.workspace }}

.github/workflows/deploy-pull-requests.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,4 @@ jobs:
2626
vercel-org-id: ${{ secrets.MISTICA_WEB_VERCEL_ORG_ID}} # required
2727
vercel-project-id: ${{ secrets.MISTICA_WEB_VERCEL_PROJECT_ID}} # required
2828
vercel-project-name: mistica-web # not required by the docs, but the action fails if not specified. See https://github.com/amondnet/vercel-action/issues/30#issuecomment-678608424
29-
ref: ${{ github.sha }}
3029
working-directory: ${{ github.workspace }}

.github/workflows/label-trigger-deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ jobs:
1919
with:
2020
script: |
2121
const TARGET_LABEL = 'safe-to-deploy';
22-
const label = github.event.label && github.event.label.name;
22+
const label = context.payload.label && context.payload.label.name;
2323
if (label !== TARGET_LABEL) {
2424
core.info(`Label '${label}' is not '${TARGET_LABEL}', skipping dispatch.`);
2525
return;
2626
}
2727
28-
const prNumber = github.event.pull_request && github.event.pull_request.number;
28+
const prNumber = context.payload.pull_request && context.payload.pull_request.number;
2929
if (!prNumber) {
3030
core.setFailed('Could not find pull request number in event payload.');
3131
return;

0 commit comments

Comments
 (0)