Skip to content

Commit 0ef8668

Browse files
authored
Create main.yml
1 parent e6f1e71 commit 0ef8668

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/main.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
7+
jobs:
8+
build:
9+
runs-on: self-hosted
10+
steps:
11+
- name: Deploy
12+
uses: appleboy/ssh-action@master
13+
with:
14+
host: ${{ secrets.REMOTE_HOST }}
15+
username: ${{ secrets.REMOTE_USER }}
16+
port: ${{ secrets.REMOTE_PORT }}
17+
key: ${{ secrets.SSH_PRIVATE_KEY }}
18+
script: |
19+
cd /home/pychan/PyChan-Bot
20+
git checkout master
21+
git pull
22+
docker build -t pychan .
23+
cd ../
24+
docker compose up -d
25+
echo "$(date): actions build success" >> actions-logs.txt

0 commit comments

Comments
 (0)