Skip to content

Commit

Permalink
add gh actions on main
Browse files Browse the repository at this point in the history
  • Loading branch information
sntxrr committed Oct 27, 2022
1 parent 045e8ff commit 8978174
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflow/deploy-and-invalidate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Upload custom Element

on:
push:
branches:
- production

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: AWS s3 sync
- uses: actions/checkout@master
- uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-west-2'
SOURCE_DIR: 'dist'
- name: Invalidate Cloudfront cache
- uses: chetan/invalidate-cloudfront-action@v2
env:
DISTRIBUTION: ${{ secrets.DISTRIBUTION }}
PATHS: "/*"
AWS_REGION: "us-west-2"
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

0 comments on commit 8978174

Please sign in to comment.