File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Docker Image CI
2+
3+ on :
4+ push :
5+ branches : [ "edge" ]
6+
7+ jobs :
8+
9+ build-and-run :
10+
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - uses : actions/checkout@v4
15+
16+ - name : Login to Docker Hub
17+ uses : docker/login-action@v2
18+ with :
19+ username : staticaron
20+ password : ${{ secrets.DOCKER_PASSWORD }}
21+
22+ - name : Build the Docker image
23+ run : docker build -t staticaron/yui-bot:latest .
24+
25+ - name : Push the Image
26+ run : docker push staticaron/yui-bot:latest
27+
28+ - name : Log into the VPS
29+ uses : appleboy/ssh-action@v1.2.0
30+ with :
31+ host : ${{ secrets.VPS_HOST }}
32+ username : ${{ secrets.VPS_USERNAME }}
33+ key : ${{ secrets.VPS_KEY }}
34+ port : 22
35+ script : |
36+ docker pull staticaron/yui-bot:latest
37+
38+ docker stop yui-bot || true
39+ docker rm yui-bot || true
40+
41+ docker run --rm -d --name yui-bot staticaron/yui-bot:latest
You can’t perform that action at this time.
0 commit comments