Skip to content

Commit

Permalink
Update CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien CAFFET committed Jan 11, 2025
1 parent eaac6de commit 287c7de
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/vm-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ env:
jobs:
build_and_deploy:
runs-on: ubuntu-latest
environment: ${{ github.ref == 'refs/heads/prod' && 'prod' || github.ref == 'refs/heads/dev' && 'dev' }}
environment: ${{ github.ref == 'refs/heads/prod' && 'prod' || github.ref == 'refs/heads/dev' && 'dev' || 'dev' }}

steps:
- name: Checkout
Expand All @@ -45,6 +45,12 @@ jobs:
touch ${{ env.TARBALL_NAME }}
eval "tar -czf ${{ env.TARBALL_NAME }} --exclude=${{ env.TARBALL_NAME }} $EXCLUDES -C . ."
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::${{ env.AWS_ACCOUNT_ID }}:role/${{ env.PRODUCT }}-${{ env.APPLICATION }}-deployer-${{ env.AWS_REGION }}-${{ env.ENVIRONMENT }}
aws-region: ${{ env.AWS_REGION }}

- name: Push to S3
run: |
aws s3 sync ${{ env.TARBALL_NAME }} s3://${{ env.AWS_S3_BUCKET }} --follow-symlinks --delete --no-progress

0 comments on commit 287c7de

Please sign in to comment.