Add deployment workflow for ChatGPT-Discord-Bot

This commit is contained in:
2025-12-02 20:42:52 +07:00
parent d549c43844
commit db90774e17
2 changed files with 29 additions and 1 deletions

28
.github/workflows/deploy.yml vendored Normal file
View File

@@ -0,0 +1,28 @@
name: Build and Deploy ChatGPT-Discord-Bot
on:
workflow_dispatch:
jobs:
deploy:
runs-on: quocanh
permissions:
contents: read
packages: write
# cd to /vps/chatgptdsc and do docker compose down then docker compose pull the docker compose up -d
steps:
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: cd to deployment directory
run: cd /vps/chatgptdsc
- name: Pull latest images
run: docker compose -f docker-compose.yml pull
- name: Stop existing services
run: docker compose -f docker-compose.yml down
- name: Start services
run: docker compose -f docker-compose.yml up -d

View File

@@ -1,4 +1,4 @@
name: Build and Deploy ChatGPT-Discord-Bot
name: Build ChatGPT-Discord-Bot
on:
workflow_dispatch: