Skip to content

Commit

Permalink
use short sha instead
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Kanzer authored and Aaron Kanzer committed Sep 20, 2024
1 parent 9c99efb commit 9320b27
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/deploy_preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

0 comments on commit 9320b27

Please sign in to comment.