Skip to content

Commit

Permalink
set endpoint in action
Browse files Browse the repository at this point in the history
  • Loading branch information
ethangardner committed Jul 5, 2024
1 parent 3c1c60c commit fabdd8b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/post-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,14 @@ jobs:
echo "Workflow triggered by event '${{ github.event_name }}'."
echo "Workflow triggered by actor '${{ github.actor }}''."
echo "Target url is '${{ github.event.deployment_status.target_url }}''."
- name: Determine E2E_ENDPOINT
run: >
echo E2E_ENDPOINT=$(if [[ "${{ github.event_name }}" == "pull_request" && "${{ github.head_ref }}" != "main" ]]; then
echo "${{ vars.PREVIEW_URL }}/${{ github.head_ref }}";
else
echo "${{ vars.MAIN_URL }}";
fi) >> $GITHUB_ENV
- name: Run Storybook tests
run: pnpm --filter=end-to-end-tests test:storybook --config-dir ./packages/design/.storybook/ --browsers firefox chromium
env:
TARGET_URL: '${{ github.event.deployment_status.target_url }}'
TARGET_URL: '${{ env.E2E_ENDPOINT }}'

0 comments on commit fabdd8b

Please sign in to comment.