Skip to content

[MIK-373] Create cutscenes #581

[MIK-373] Create cutscenes

[MIK-373] Create cutscenes #581

Workflow file for this run

name: build.miku.gg deployment
on:
push:
branches:
- master
paths:
- apps/novel-builder/**
- packages/**
- .github/workflows/build.miku.gg.yml
- package.json
- pnpm-lock.yaml
- pnpm-workspace.yaml
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- master
paths:
- apps/novel-builder/**
- packages/**
- .github/workflows/build.miku.gg.yml
- package.json
- pnpm-lock.yaml
- pnpm-workspace.yaml
jobs:
build_and_test_job:
if: github.event_name != 'push' || github.ref != 'refs/heads/master'
runs-on: ubuntu-latest
name: Build and Test Job
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Install
run: npm i -g pnpm && pnpm install --no-frozen-lockfile && pnpm test && pnpm run build --scope=@mikugg/novel-builder
deploy_job:
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
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/novel-builder
env:
VITE_GTM_ID: ${{ secrets.VITE_GTM_ID}}
VITE_ASSETS_DIRECTORY_ENDPOINT: ${{ secrets.VITE_ASSETS_DIRECTORY_ENDPOINT}}
VITE_ASSETS_UPLOAD_URL: ${{ secrets.VITE_ASSETS_UPLOAD_URL }}
VITE_STAGE: production
VITE_SERVICES_ENDPOINT: ${{ secrets.VITE_SERVICES_ENDPOINT }}
- name: Deploy to S3
run: aws s3 sync apps/novel-builder/dist ${{ secrets.S3_BUCKET_BUILD }} --delete
- name: Set Cache-Control
run: aws s3 cp apps/novel-builder/dist/index.html ${{ secrets.S3_BUCKET_BUILD }}/index.html --metadata-directive REPLACE --cache-control max-age=0
- name: Invalidate Cloudfront distribution
run: aws cloudfront create-invalidation --distribution-id ${{ secrets.CF_DISTRIBUTION_BUILD }} --paths "/*"