Skip to content

v0.7.1

v0.7.1 #3

name: Deploy App
on:
release:
types:
- published
jobs:
build_and_deploy:
name: Build and Push to Bucket
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Configure AWS credentials
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-east-1
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Install pnpm
run: npm i -g [email protected]
- name: Install dependencies
run: pnpm i
- name: Build
run: pnpm run build
- name: Deploy static site to S3 bucket
if: success()
env:
BUCKET_NAME: ${{ secrets.S3_REGISTRY_BUCKET }}
run: aws s3 sync ./dist/sorobanhub-app/browser s3://$BUCKET_NAME --delete
- name: Invalidate Cloudfront cache
if: success()
env:
DISTRIBUTION_ID: ${{ secrets.DISTRIBUTION_ID }}
run: aws cloudfront create-invalidation --distribution-id $DISTRIBUTION_ID --paths '/*'