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
|
||||
ADMIN_BOT_TOKEN=CHANGE_ME
|
||||
USER_BOT_TOKEN=8876513915:AAHA6VPGpbKSkn6Fdhwv2PfkRB7ojfgd6_U
|
||||
ADMIN_BOT_TOKEN=8865704844:AAF2wmXiAZtfTlgdpMUwuj5S8lsjVS0lwQM
|
||||
TTS_VOICE=ru-RU-DmitryNeural
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
name: Test pipeline
|
||||
name: CI/CD Pipeline
|
||||
|
||||
on:
|
||||
push:
|
||||
|
|
@ -6,19 +6,32 @@ on:
|
|||
- master
|
||||
|
||||
jobs:
|
||||
test:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Show files
|
||||
run: |
|
||||
pwd
|
||||
ls -la
|
||||
find . -maxdepth 2 -type f | sort
|
||||
- name: Setup .env for CI/CD
|
||||
run: cp .env.example .env
|
||||
|
||||
- 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: |
|
||||
cp .env.example .env
|
||||
docker compose config
|
||||
sleep 5
|
||||
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