Skip to content

Commit

Permalink
use $GITHUB_HEAD_REF to get branch name when sharing preivew
Browse files Browse the repository at this point in the history
  • Loading branch information
ayinloya committed Jul 31, 2024
1 parent ee39b23 commit feb49f9
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/share-preview-url.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,11 @@ jobs:
- name: install sst
run: |
curl -fsSL https://ion.sst.dev/install | VERSION=0.1.51 bash
- name: set branch name
id: get_branch_name
run: |
BRANCH_NAME=${{ github.event.pull_request.head.ref }}
SANITIZED_BRANCH_NAME=$(echo "$BRANCH_NAME" | sed 's/[^a-zA-Z0-9]/-/g')
echo "SS_STAGE=$SANITIZED_BRANCH_NAME" >> $GITHUB_OUTPUT
- name: retrieve sst app url
id: get_app_url
working-directory: ./previews
run: |
echo "PREVIEW_APP_URL=$(sst shell node get_app_url.js --stage=${{ steps.set_branch_name.outputs.BRANCH_NAME }})" >> "GITHUB_OUTPUT"
echo "PREVIEW_APP_URL=$(sst shell node get_app_url.js --stage=$GITHUB_HEAD_REF)" >> "GITHUB_OUTPUT"
- name: get dest dir for web smart-camera-web
id: get_dest_dir_smart_camera_web
working-directory: ./packages/smart-camera-web
Expand Down

0 comments on commit feb49f9

Please sign in to comment.