Skip to content

fix: Remove type from IPI field in upload flow (#841) #113

fix: Remove type from IPI field in upload flow (#841)

fix: Remove type from IPI field in upload flow (#841) #113

name: Deploy NEWM Studio to AWS Hosting on merge
on:
push:
branches:
- master
paths:
- .github/workflows/aws-hosting-merge-deploy-newm-studio.yml
- apps/studio/**
- packages/**
- package-lock.json
jobs:
build_and_deploy:
runs-on: ubuntu-latest
permissions:
id-token: write # required to interact with GitHub's OIDC Token endpoint.
contents: read
steps:
- uses: actions/checkout@v3
- run: npm install
- run: npx nx build-with-sentry studio
env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
VITE_APPLE_CLIENT_ID: ${{ secrets.APPLE_CLIENT_ID }}
VITE_GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }}
VITE_GA_STUDIO_ID: ${{ secrets.GA_STUDIO_ID }}
VITE_RECAPTCHA_SITE_KEY_STAGING: ${{ secrets.RECAPTCHA_SITE_KEY_STAGING }}
VITE_LAUNCHDARKLY_CLIENT_ID_STAGING: ${{ secrets.LAUNCHDARKLY_CLIENT_ID_STAGING }}
VITE_DEXHUNTER_STUDIO_PARTNER_CODE: ${{ secrets.DEXHUNTER_STUDIO_PARTNER_CODE }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
VITE_ENV: staging
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.AWS_GITHUB_DEPLOY_ROLE_ARN_GARAGE }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Deploy to S3
run: aws --region ${{ secrets.AWS_REGION }} s3 sync ./dist/apps/studio s3://${{ secrets.AWS_STUDIO_BUCKET_GARAGE }} --no-progress --delete
- name: Invalidate Cloudfront Cache
run: aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_STUDIO_DISTRIBUTION_GARAGE }} --paths '/*'
- name: Send update to slack
id: slack
uses: slackapi/[email protected]
with:
payload: |
{
"text": "NEWM Studio updated in staging. View at https://artist.garage.newm.io ."
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_NEWM_STUDIO_WEBHOOK }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK