Skip to content

interactor.miku.gg deployment #3

interactor.miku.gg deployment

interactor.miku.gg deployment #3

name: interactor.miku.gg deployment
on:
workflow_dispatch:
branches: [master]
jobs:
deploy_job:
runs-on: ubuntu-latest
name: Deploy Job
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Setup AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2
- name: Install
run: npm i -g pnpm && pnpm install --no-frozen-lockfile && pnpm run build --scope=@mikugg/browser-chat
env:
VITE_SERVICES_ENDPOINT: ${{ secrets.VITE_SERVICES_ENDPOINT }}
VITE_BOT_DIRECTORY_ENDPOINT: ${{ secrets.VITE_BOT_DIRECTORY_ENDPOINT }}
VITE_IMAGES_DIRECTORY_ENDPOINT: ${{ secrets.VITE_IMAGES_DIRECTORY_ENDPOINT }}
VITE_AUDIO_DIRECTORY_ENDPOINT: ${{ secrets.VITE_AUDIO_DIRECTORY_ENDPOINT }}
VITE_PLATFORM_API: ${{ secrets.VITE_PLATFORM_API_PROD }}
VITE_GTM_ID: ${{ secrets.VITE_GTM_ID}}
- name: Deploy to S3
run: aws s3 sync apps/browser-chat/dist ${{ secrets.S3_BUCKET_INTERACTOR }} --delete
- name: Invalidate Cloudfront distribution
run: aws cloudfront create-invalidation --distribution-id ${{ secrets.CF_DISTRIBUTION_INTERACTOR }} --paths "/*"