Skip to content

fix(egress-composite): remove unused files and move custom.css #732

fix(egress-composite): remove unused files and move custom.css

fix(egress-composite): remove unused files and move custom.css #732

name: Deploy React Sample Apps
on:
push:
branches:
- main
paths:
- '.github/workflows/deploy-react-sample-apps.yml'
- 'sample-apps/react/**'
- '!packages/**' # avoid duplicated deployment if react-sdk also changed
pull_request:
types:
- opened
- synchronize
- reopened
paths:
- '.github/workflows/deploy-react-sample-apps.yml'
- 'sample-apps/react/**'
- 'packages/**'
- '!packages/react-native-sdk/**'
- '!**/docusaurus/**'
workflow_dispatch:
jobs:
build-and-deploy-sample-apps:
name: Deploy ${{ matrix.application.name }}
timeout-minutes: 15
runs-on: ubuntu-latest
strategy:
matrix:
application:
- name: messenger-clone-react
folder: messenger-clone
project-id: prj_FNUiw2FtWJEDVHP5XttyLQmGw39n
populate-tokens: true
- name: zoom-clone-react
folder: zoom-clone
project-id: prj_y2GjsUXNvW7MdQ0EpJVG0FBNNovL
populate-tokens: true
- name: egress-composite
project-id: prj_R6DLpP2Gxc0aRHGEopQWE8tveNDX
- name: livestream-app-react
folder: livestream-app
project-id: prj_uNJTw7DefSAntAoWCXwJaHc1khoA
- name: audio-rooms
project-id: prj_0WnHcvVkXpM4PRc2ymVmrAHFILoT
- name: react-dogfood
project-id: prj_4TTdjeVHEDhWWiFRfjIr1QFb5ell
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ matrix.application.project-id }}
VITE_STREAM_API_KEY: ${{ vars.EGRESS_STREAM_API_KEY }}
VITE_STREAM_USER_TOKEN: ${{ secrets.EGRESS_USER_TOKEN }}
VITE_STREAM_KEY: ${{ vars.STREAM_API_KEY_SAMPLE_APPS }}
VITE_STREAM_SECRET: ${{ secrets.STREAM_SECRET_SAMPLE_APPS }}
VITE_VIDEO_DEMO_SENTRY_DNS: ${{secrets.VIDEO_DEMO_SENTRY_DNS}}
VITE_TOKEN_PROVIDER_URL: ${{secrets.TOKEN_PROVIDER_URL}}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
# - uses: dorny/[email protected]
# id: changes
# with:
# filters: |
# sample-apps:
# - 'sample-apps/react/${{ matrix.application.folder || matrix.application.name }}/**/*'
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: 'yarn'
- name: Install Dependencies
run: yarn install --immutable
- name: Populate tokens
if: ${{ matrix.application.populate-tokens }}
run: yarn workspace @stream-io/${{ matrix.application.name }} scripts:populate-tokens
- name: Build packages
env:
NODE_ENV: production
run: yarn build:react:deps
### Vercel deployment (Preview) ###
- name: Vercel Pull/Build/Deploy (Preview)
if: ${{ github.ref_name != 'main' }}
run: >
yarn vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} &&
yarn vercel build --token=${{ secrets.VERCEL_TOKEN }} &&
yarn vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}
### Vercel deployment (Production) ###
- name: Vercel Pull/Build/Deploy (Production)
if: ${{ github.ref_name == 'main' }}
run: >
yarn vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} &&
yarn vercel build --prod --token=${{ secrets.VERCEL_TOKEN }} &&
yarn vercel deploy --prod --prebuilt --token=${{ secrets.VERCEL_TOKEN }}