feat: CI/CD pipeline with build test and deploy gate
This commit is contained in:
parent
c891caa68c
commit
ebdceb5bd9
2 changed files with 27 additions and 14 deletions
|
|
@ -1,3 +1,3 @@
|
||||||
USER_BOT_TOKEN=CHANGE_ME
|
USER_BOT_TOKEN=8876513915:AAHA6VPGpbKSkn6Fdhwv2PfkRB7ojfgd6_U
|
||||||
ADMIN_BOT_TOKEN=CHANGE_ME
|
ADMIN_BOT_TOKEN=8865704844:AAF2wmXiAZtfTlgdpMUwuj5S8lsjVS0lwQM
|
||||||
TTS_VOICE=ru-RU-DmitryNeural
|
TTS_VOICE=ru-RU-DmitryNeural
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
name: Test pipeline
|
name: CI/CD Pipeline
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
|
@ -6,19 +6,32 @@ on:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Show files
|
- name: Setup .env for CI/CD
|
||||||
run: |
|
run: cp .env.example .env
|
||||||
pwd
|
|
||||||
ls -la
|
|
||||||
find . -maxdepth 2 -type f | sort
|
|
||||||
|
|
||||||
- name: Check Docker Compose config
|
- name: Build Docker image
|
||||||
|
run: docker compose build
|
||||||
|
|
||||||
|
- name: Start container
|
||||||
|
run: docker compose up -d
|
||||||
|
|
||||||
|
- name: Verify bot running
|
||||||
run: |
|
run: |
|
||||||
cp .env.example .env
|
sleep 5
|
||||||
docker compose config
|
docker compose logs --tail=20
|
||||||
|
|
||||||
|
- name: Stop container
|
||||||
|
run: docker compose down
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
needs: build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
environment: production
|
||||||
|
steps:
|
||||||
|
- name: Deploy (placeholder)
|
||||||
|
run: echo "🚀 Деплой будет добавлен позже"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue