-
-
Notifications
You must be signed in to change notification settings - Fork 4
64 lines (53 loc) · 1.65 KB
/
deploy.yaml
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Deploy
on:
push:
branches:
- trunk
paths:
- ".github/workflows/deploy.yaml"
- "chunithm_net/**"
- "cogs/**"
- "database/**"
- "tests/**"
- "utils/**"
- "bot.py"
- "poetry.lock"
- "pyproject.toml"
- "web.py"
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Install rye
uses: eifinger/setup-rye@cba39b644640fb95c375ce5bfe2fdf33c0b815fc # v4
with:
version: "0.41.0"
enable-cache: true
cache-prefix: "rye-cache"
- name: Install dependencies
run: rye sync --all-features
- name: Run type checking
run: rye run basedpyright
- name: Run tests
run: rye run pytest -v --html=report.html --self-contained-html
- name: Upload test report
if: always()
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: test-report
path: report.html
if-no-files-found: error
# - name: Deploy bot
# uses: appleboy/ssh-action@334f9259f2f8eb3376d33fa4c684fff373f2c2a6
# with:
# host: ${{ secrets.SSH_HOST }}
# username: chuninewbot
# key: ${{ secrets.SSH_KEY }}
# script: |
# cd /home/chuninewbot/chuninewbot
# git pull
# /home/chuninewbot/.local/bin/poetry install --without dev --all-extras
# /home/chuninewbot/.local/bin/poetry run alembic upgrade head
# systemctl --user restart chunibot