Merge branch 'develop' #82
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to S3 | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: s3deploy | |
timeout-minutes: 5 | |
uses: jakejarvis/s3-sync-action@master | |
with: | |
args: --acl public-read --follow-symlinks --delete --exclude '.git*/*' | |
env: | |
SOURCE_DIR: './' | |
AWS_S3_BUCKET: ${{ secrets.S3_BUCKET }} | |
AWS_REGION: ${{ secrets.S3_BUCKET_REGION }} | |
invalidate: | |
needs: deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: CFinvalidate | |
uses: chetan/invalidate-cloudfront-action@v2 | |
env: | |
DISTRIBUTION: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }} | |
PATHS: '/' | |
AWS_REGION: 'us-west-2' | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
notify: | |
needs: invalidate | |
runs-on: ubuntu-latest | |
steps: | |
- name: Slack Notification | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
SLACK_USERNAME: Schema Deployment | |
SLACK_ICON: https://assets.verida.io/s3.png | |
SLACK_TITLE: Deployment of ${{ github.event.repository.name }} schemas complete | |
SLACK_FOOTER: Generated on merge to ${{ github.event.repository.name }} |