Skip to content

Commit

Permalink
ci: make tags deploy to prod
Browse files Browse the repository at this point in the history
  • Loading branch information
diegopf committed Oct 27, 2023
1 parent b783771 commit 105371d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
node-version: '18'
- name: Install deps, build and test project
uses: ./.github/actions/install
# Every push to main deploys to staging
- name: Deploy to staging
if: ${{ github.ref_name == 'main' }}
uses: ./.github/actions/deploy
Expand All @@ -26,4 +27,15 @@ jobs:
aws_s3_sync_args: --include '*' --exclude '*/*'
aws_s3_cache: no-store
cloudfront_distribution_id: ${{ secrets.CLOUDFRONT_ID_STAGING }}
cloudfront_invalidation_paths: '/*'
# Only tags named as release-* will deploy to production
- name: Deploy to prod
if: startsWith(github.ref, 'refs/tags/release-')
uses: ./.github/actions/deploy
with:
aws_role: ${{ secrets.AWS_ROLE_PRODUCTION_ACCOUNT }}
aws_deploy_path: ${{ secrets.TEST_BUCKET }}
aws_s3_sync_args: --include '*' --exclude '*/*'
aws_s3_cache: max-age=3600
cloudfront_distribution_id: ${{ secrets.CLOUDFRONT_ID_PRODUCTION }}
cloudfront_invalidation_paths: '/*'

0 comments on commit 105371d

Please sign in to comment.