-
-
Notifications
You must be signed in to change notification settings - Fork 3
48 lines (40 loc) · 1.11 KB
/
backend-deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Deploy Bot to Railway
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
- name: Install Railway CLI
run: |
curl -fsSL https://railway.app/install.sh | sh
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests
run: |
pytest tests/test_manual.py
env:
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
CLAUDE_KEY: ${{ secrets.CLAUDE_KEY }}
- name: Deploy to Railway
run: |
railway up --service ${{ secrets.RAILWAY_SERVICE_NAME }}
env:
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
CLAUDE_KEY: ${{ secrets.CLAUDE_KEY }}
permissions:
contents: read