Skip to content

STUD-228: Update "primary creator" artist agreement checkbox copy #271

STUD-228: Update "primary creator" artist agreement checkbox copy

STUD-228: Update "primary creator" artist agreement checkbox copy #271

name: Deploy NEWM Studio to AWS Hosting on PR
on:
pull_request:
paths:
- .github/workflows/aws-hosting-pull-request-newm-studio.yml
- apps/studio/**
- packages/**
- package-lock.json
jobs:
build_and_preview:
if: "${{ github.event.pull_request.head.repo.full_name == github.repository }}"
runs-on: ubuntu-latest
permissions:
id-token: write # required to interact with GitHub's OIDC Token endpoint.
contents: read
pull-requests: write # Explicitly allow writing to pull requests
steps:
- uses: actions/checkout@v3
- run: npm install
- run: npx nx build studio --no-cloud
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_PREVIEW_BUCKET }}/${{ github.event.pull_request.number }} --no-progress --delete
- name: Invalidate Cloudfront Cache
run: aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_STUDIO_DISTRIBUTION_GARAGE }} --paths '/*'
- name: Url to PR comment
uses: mshick/add-pr-comment@v2
with:
message: |
Visit the studio preview URL for this PR :rocket: : https://${{ github.event.pull_request.number }}.artist.preview.newm.io/