Skip to content

Deploy Bot

Deploy Bot #25

Workflow file for this run

name: Deploy Bot
on:
workflow_dispatch:
jobs:
run:
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- name: Stop and Remove Existing Container
run: |
if docker inspect psthcbot &> /dev/null; then
docker stop psthcbot
docker rm psthcbot
fi
- name: Run Container
run: docker compose up -d --build
env:
ENV: PROD
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
DB_URI: ${{ secrets.DB_URI }}
LOGS_WEBHOOK_URL: ${{ secrets.LOGS_WEBHOOK_URL }}
- name: Display Logs
run: python3 -m exendlr psthcbot "Bot prêt !"
- name: Cleanup unused images
run: docker image prune -f