Skip to content

Commit 5a037d8

Browse files
committed
add action
1 parent 221ca55 commit 5a037d8

4 files changed

Lines changed: 86 additions & 1 deletion

File tree

.github/workflows/deploy.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: deploy
2+
3+
on:
4+
push:
5+
branches: [ "dev" ]
6+
7+
workflow_dispatch:
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Deploy
15+
uses: appleboy/ssh-action@v1.0.0
16+
with:
17+
host: ${{ secrets.REMOTE_HOST }}
18+
port: ${{ secrets.REMOTE_PORT }}
19+
username: ${{ secrets.REMOTE_USER }}
20+
password: ${{ secrets.REMOTE_PASSWD }}
21+
script: |
22+
cd ${{ secrets.REMOTE_WORKDIR }}
23+
bash action_deploy.sh

action_deploy.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
mkdir -p /www/code
2+
cd /www/code
3+
git clone https://github.com/codists/python-talk.git
4+
5+
mkdir -p /www/frontend/python_talk
6+
cd /www/code/python-talk/frontend
7+
npm install -y
8+
npm run build
9+
cp -r /www/code/python-talk/frontend/dist /www/frontend/python_talk/
10+
11+
cp -r /www/code/python-talk/deployment/common /www
12+
cd /www/common/
13+
docker compose -f docker-compose-common.yml up -d
14+
15+
mkdir -p /www/backend/python_talk
16+
cp -r /www/code/python-talk/backend/ /www/backend/python_talk/
17+
cd /www/backend/python_talk/backend
18+
docker build -t python_talk:0.0.1 /www/backend/python_talk/backend
19+
docker compose -f /www/backend/python_talk/backend/docker-compose.yml up -d

backend/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ services:
44
flask:
55
build: .
66
ports:
7-
- "9000:5000"
7+
- "5000:5000"
88
volumes:
99
- ./python_talk/:/app
1010
environment:

backend/requirements.txt

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<<<<<<< Updated upstream
12
alembic==1.8.0
23
amqp==5.1.1
34
async-timeout==4.0.2
@@ -31,3 +32,45 @@ vine==5.0.0
3132
wcwidth==0.2.5
3233
Werkzeug==2.1.2
3334
wrapt==1.14.1
35+
=======
36+
alembic==1.16.4
37+
amqp==5.3.1
38+
apispec==6.8.2
39+
billiard==4.2.1
40+
blinker==1.9.0
41+
celery==5.5.3
42+
cffi==1.17.1
43+
click==8.2.1
44+
click-didyoumean==0.3.1
45+
click-plugins==1.1.1.2
46+
click-repl==0.3.0
47+
colorama==0.4.6
48+
cryptography==45.0.5
49+
Flask==3.1.1
50+
Flask-Mail==0.10.0
51+
Flask-Migrate==4.1.0
52+
flask-smorest==0.46.1
53+
Flask-SQLAlchemy==3.1.1
54+
greenlet==3.2.3
55+
itsdangerous==2.2.0
56+
Jinja2==3.1.6
57+
kombu==5.5.4
58+
Mako==1.3.10
59+
MarkupSafe==3.0.2
60+
marshmallow==4.0.0
61+
packaging==25.0
62+
prompt_toolkit==3.0.51
63+
pycparser==2.22
64+
PyMySQL==1.1.1
65+
python-dateutil==2.9.0.post0
66+
python-dotenv==1.1.1
67+
six==1.17.0
68+
SQLAlchemy==2.0.41
69+
typing_extensions==4.14.1
70+
tzdata==2025.2
71+
vine==5.1.0
72+
wcwidth==0.2.13
73+
webargs==8.7.0
74+
Werkzeug==3.1.3
75+
gunicorn==23.0.0
76+
>>>>>>> Stashed changes

0 commit comments

Comments
 (0)