Skip to content

Merge pull request #55 from SAIG-KMITL/fix/summarize-video #34

Merge pull request #55 from SAIG-KMITL/fix/summarize-video

Merge pull request #55 from SAIG-KMITL/fix/summarize-video #34

Workflow file for this run

name: Build and deploy to an VM
on:
push:
branches:
- dev
workflow_dispatch:
permissions:
contents: write
jobs:
build-and-deploy:
runs-on: self-hosted
steps:
- name: Copy Repository
uses: actions/checkout@v4
- name: 'Create env file'
run: |
touch .env
echo "NODE_ENV=${{ secrets.NODE_ENV }}" >> .env
echo "PORT=${{ secrets.PORT }}" >> .env
echo "DB_HOST=${{ secrets.DB_HOST }}" >> .env
echo "DB_PORT=${{ secrets.DB_PORT }}" >> .env
echo "DB_USERNAME=${{ secrets.DB_USERNAME }}" >> .env
echo "DB_PASSWORD=${{ secrets.DB_PASSWORD }}" >> .env
echo "DB_DATABASE=${{ secrets.DB_DATABASE }}" >> .env
echo "CORS_ALLOW_ORIGIN=${{ secrets.CORS_ALLOW_ORIGIN }}" >> .env
echo "JWT_ACCESS_SECRET=${{ secrets.JWT_ACCESS_SECRET }}" >> .env
echo "JWT_REFRESH_SECRET=${{ secrets.JWT_REFRESH_SECRET }}" >> .env
echo "JWT_ACCESS_EXPIRATION=${{ secrets.JWT_ACCESS_EXPIRATION }}" >> .env
echo "JWT_REFRESH_EXPIRATION=${{ secrets.JWT_REFRESH_EXPIRATION }}" >> .env
echo "AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }}" >> .env
echo "AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }}" >> .env
echo "AWS_REGION=${{ secrets.AWS_REGION }}" >> .env
echo "AWS_BUCKET_NAME=${{ secrets.AWS_BUCKET_NAME }}" >> .env
echo "ADMIN_EMAIL=${{ secrets.ADMIN_EMAIL }}" >> .env
echo "ADMIN_PASSWORD=${{ secrets.ADMIN_PASSWORD }}" >> .env
echo "AI_URL=${{ secrets.AI_URL }}" >> .env
echo "API_URL=${{ secrets.API_URL }}" >> .env
echo "API_URL=${{ secrets.API_URL }}" >> .env
echo "VOLUMES_PATH=${{ secrets.VOLUMES_PATH }}" >> .env
cat .env
- name: Running Docker Compose
run: docker compose up -d --build