1
0
mirror of https://github.com/one-among-us/data.git synced 2025-04-23 23:04:21 +08:00

Update preview.yml

This commit is contained in:
Azalea 2025-02-10 06:00:21 +08:00 committed by GitHub
parent 9c1b6e82b6
commit f8f7e1a64b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9,9 +9,6 @@ on:
pr_number: pr_number:
description: 'Pull Request number to deploy preview for' description: 'Pull Request number to deploy preview for'
required: true required: true
pr_branch:
description: 'The branch name to deploy'
required: true
jobs: jobs:
build: build:
@ -33,17 +30,15 @@ jobs:
run: | run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
echo "PR_NUMBER=${{ github.event.inputs.pr_number }}" >> $GITHUB_ENV echo "PR_NUMBER=${{ github.event.inputs.pr_number }}" >> $GITHUB_ENV
echo "PR_BRANCH=${{ github.event.inputs.pr_branch }}" >> $GITHUB_ENV
else else
echo "PR_NUMBER=${{ github.event.pull_request.number }}" >> $GITHUB_ENV echo "PR_NUMBER=${{ github.event.pull_request.number }}" >> $GITHUB_ENV
echo "PR_BRANCH=${{ github.event.pull_request.head.ref }}" >> $GITHUB_ENV
fi fi
# Now check out the PRs head branch (whether from a PR event or supplied manually) # Now check out the PRs head branch (whether from a PR event or supplied manually)
- name: Checkout PR branch - name: Checkout PR branch
uses: actions/checkout@v4 uses: actions/checkout@v4
with: with:
ref: ${{ env.PR_BRANCH }} ref: "refs/pull/${{ env.PR_NUMBER }}/merge"
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v4