diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml index 410e370ec..f8f8b8db0 100644 --- a/.github/workflows/deploy_preview.yml +++ b/.github/workflows/deploy_preview.yml @@ -20,14 +20,18 @@ on: jobs: deploy: runs-on: ubuntu-latest - outputs: - artifact-name: ${{ steps.upload-artifact.outputs.artifact-name }} steps: - name: Checkout Repository uses: actions/checkout@v4 with: ref: ${{ github.event.inputs.commit_sha || github.sha }} + - name: Set short sha name for sub-directory + id: vars + run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + - name: Check outputs + run: echo ${{ steps.vars.outputs.sha_short }} + - name: Setup Node.js uses: actions/setup-node@v4 with: @@ -48,4 +52,4 @@ jobs: - name: Upload to S3 run: | - aws s3 sync dist/client/ ${{ secrets.CLOUDFRONT_DEPLOYMENT_LOCATION }}/staging/pr${{ github.event.inputs.pr_id || 'manual' }}/ --delete + aws s3 sync dist/client/ ${{ secrets.CLOUDFRONT_DEPLOYMENT_LOCATION }}/staging/${{ steps.vars.outputs.sha_short }}/ --delete