Skip to content

Commit

Permalink
Merge pull request #20144 from apache/workflow/pr-preview
Browse files Browse the repository at this point in the history
chore(workflow): fix pr-preview workflow
  • Loading branch information
Ovilia authored Jul 15, 2024
2 parents c329192 + 33249dc commit 4d3cb2c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/pr-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@ jobs:
workflow: ${{ github.event.workflow.id }}
run_id: ${{ github.event.workflow_run.id }}
name: pr_preview
path: pr-dist
if_no_artifact_found: fail

- name: Output PR metadata
id: pr-metadata
working-directory: pr-dist
run: |
echo "NUMBER=$(cat pr_number)" >> $GITHUB_OUTPUT
echo "COMMIT_SHA=$(cat pr_commit_sha)" >> $GITHUB_OUTPUT
Expand All @@ -59,6 +61,7 @@ jobs:
env:
PR_NUMBER: ${{ steps.pr-metadata.outputs.NUMBER }}
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
working-directory: pr-dist
run: |
export SURGE_DOMAIN=https://echarts-pr-$PR_NUMBER.surge.sh
npx surge --project ./package --domain $SURGE_DOMAIN --token $SURGE_TOKEN
Expand Down

0 comments on commit 4d3cb2c

Please sign in to comment.