Skip to content

Merge pull request #60 from jarell-santella/content #13

Merge pull request #60 from jarell-santella/content

Merge pull request #60 from jarell-santella/content #13

Workflow file for this run

name: Deploy
on:
push:
branches: master
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "18.2.0"
cache: "npm"
- name: Install [email protected]
run: npm i -g [email protected]
- name: Install dependencies
run: npm ci --prefer-offline
- name: Build
run: npm run build
- name: Set up AWS CLI
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-1
- name: Deploy to AWS S3 bucket
run: aws s3 sync public/ s3://${{ secrets.AWS_S3_BUCKET_NAME }} --delete
- name: Invalidate AWS CloudFront cache
run: aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID }} --paths "/*"