Skip to content

Commit

Permalink
don't deploy on PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
jSherz committed Nov 9, 2024
1 parent 1bd97fa commit 19dd2a7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/github-actions-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,22 @@ jobs:
run: bundle exec jekyll build

- name: Authenticate with AWS
if: github.ref == 'refs/heads/main'
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::262312054792:role/jsherz-com-github-actions
aws-region: eu-west-1

- name: Sync files to S3
if: github.ref == 'refs/heads/main'
run: |
aws s3 sync \
--metadata-directive REPLACE \
--cache-control "max-age=86400" \
_site/ s3://jsj-prod-jsherz-com-website/
- name: Clear cache
if: github.ref == 'refs/heads/main'
run: |
DISTRIBUTION_ID=$(aws cloudfront list-distributions | jq --raw-output '.DistributionList.Items | map(select((.Aliases.Quantity >= 1) and (.Aliases.Items | contains(["jsherz.com"])))) | .[0].Id')
Expand Down

0 comments on commit 19dd2a7

Please sign in to comment.