fix: update routing and update SDK (#205) #11
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy production | |
on: | |
push: | |
tags: | |
- '**' | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: 'npm' | |
- run: npm install | |
- run: npm run create:env | |
env: | |
NEXT_PUBLIC_APP_ENV: production | |
NEXT_PUBLIC_APP_ORIGIN: https://room.inlive.app | |
NEXT_PUBLIC_INLIVE_HUB_ORIGIN: https://hub.inlive.app | |
NEXT_PUBLIC_INLIVE_HUB_VERSION: v1 | |
NEXT_PUBLIC_INLIVE_API_ORIGIN: ${{secrets.API_ORIGIN}} | |
NEXT_PUBLIC_INLIVE_API_VERSION: v1 | |
NEXT_PUBLIC_MIXPANEL_TOKEN: ${{secrets.PUBLIC_MIXPANEL_TOKEN}} | |
NEXT_PUBLIC_SENTRY_DSN: ${{secrets.PUBLIC_SENTRY_DSN}} | |
NEXT_PUBLIC_ENABLE_WEBINAR: false | |
NEXT_PUBLIC_EVENT_TRIAL_COUNT: 3 | |
NEXT_PUBLIC_EVENT_FORM_URL: "https://forms.gle/wX3RX2gKWf5kT158A" | |
ALLOW_EDIT_CANCELLED_EVENT: false | |
PERSISTENT_DATA: true | |
ENABLE_MAILER: true | |
ROOM_INV_EMAIL_TEMPLATE: inlive-room-event-invitation | |
ROOM_CANCEL_EMAIL_TEMPLATE: inlive-room-event-cancelled | |
ROOM_RESCHED_EMAIL_TEMPLATE: inlive-room-event-rescheduled | |
INLIVE_HUB_API_KEY: ${{secrets.HUB_KEY}} | |
ROOM_LOCAL_STORAGE_PATH: ./storage | |
PORT: 3000 | |
MAILER_API_KEY: ${{secrets.MAILER_API_KEY}} | |
MAILER_DOMAIN : mail.inlive.app | |
- name: Set release version | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- uses: google-github-actions/auth@v2 | |
with: | |
credentials_json: ${{ secrets.GCLOUD_SERVICE_KEY }} | |
- name: 🐋 Configure Docker for pushing | |
run: gcloud auth configure-docker asia-docker.pkg.dev | |
- name: Build image | |
run: | | |
docker build --platform=linux/amd64 -t inlive-room:${{ env.RELEASE_VERSION }} . | |
- name: ☁️ Deploy to GCP Artifact Registry | |
run: | | |
docker tag inlive-room:${{ env.RELEASE_VERSION }} asia-docker.pkg.dev/asgard-livestream/inlive-asia/inlive-room:${{ env.RELEASE_VERSION }} | |
docker tag inlive-room:${{ env.RELEASE_VERSION }} asia-docker.pkg.dev/asgard-livestream/inlive-asia/inlive-room:latest | |
docker push asia-docker.pkg.dev/asgard-livestream/inlive-asia/inlive-room:${{ env.RELEASE_VERSION }} | |
docker push asia-docker.pkg.dev/asgard-livestream/inlive-asia/inlive-room:latest | |
- name: Run kubectl to update room app | |
uses: actions-hub/kubectl@master | |
env: | |
KUBE_CONFIG: ${{ secrets.MICROK8S }}å | |
with: | |
args: set image deployment/room -n inlive room=asia-docker.pkg.dev/asgard-livestream/inlive-asia/inlive-room:${{ env.RELEASE_VERSION }} |