Enhance transcript download function to skip already downloaded video… #68
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: 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 |