Skip to content

Enhance channel chat template with new controls for data source and m… #82

Enhance channel chat template with new controls for data source and m…

Enhance channel chat template with new controls for data source and m… #82

name: CI-CD
on:
push:
branches: [ "main" ] # or your production branch
jobs:
build-and-deploy:
runs-on: self-hosted
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Set up Docker buildx
uses: docker/setup-buildx-action@v2
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.CR_PAT }}
- name: Build and push Docker image
run: |
docker build -t ghcr.io/${{ github.repository }}:latest .
docker push ghcr.io/${{ github.repository }}:latest
- name: Deploy container
run: |
# Pull the newest image
docker pull ghcr.io/${{ github.repository }}:latest
# Stop old container (if running)
docker stop summarizeme.io || true
docker rm summarizeme.io || true
# Run new container
docker run -d --name summarizeme.io \
--env-file=/home/satsur/.env \
-p 8000:8000 \
ghcr.io/${{ github.repository }}:latest