This commit is contained in:
23
.gitea/workflows/deploy.yml
Normal file
23
.gitea/workflows/deploy.yml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
name: Deploy Bot
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [production]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Build Docker Image
|
||||||
|
run: docker build -t my-telegram-bot .
|
||||||
|
|
||||||
|
- name: Run Container
|
||||||
|
run: |
|
||||||
|
docker stop my-telegram-bot || true
|
||||||
|
docker rm my-telegram-bot || true
|
||||||
|
docker run -d --name my-telegram-bot --restart unless-stopped \
|
||||||
|
-e TELEGRAM_TOKEN=7745542423:AAHc3JM1kvO-Z_1OBp1L95T9QWr4jRrbfpY \
|
||||||
|
my-telegram-bot
|
Reference in New Issue
Block a user