File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Deploy
2
+ on :
3
+ push :
4
+ branches : [main]
5
+ workflow_dispatch :
6
+
7
+ jobs :
8
+ deploy :
9
+ runs-on : ubuntu-latest
10
+
11
+ steps :
12
+ - uses : actions/checkout@v4
13
+
14
+ - uses : docker/login-action@v3
15
+ with :
16
+ username : ${{ secrets.DOCKERHUB_USERNAME }}
17
+ password : ${{ secrets.DOCKERHUB_PASSWORD }}
18
+
19
+ - uses : docker/build-push-action@v6
20
+ with :
21
+ context : .
22
+ push : true
23
+ tags : swiftfiddle/swiftfiddle-runner:latest
24
+
25
+ -
uses :
appleboy/[email protected]
26
+ with :
27
+ host : ${{ secrets.SSH_HOST }}
28
+ username : ${{ secrets.SSH_USER }}
29
+ key : ${{ secrets.SSH_KEY }}
30
+ script : |
31
+ docker pull swiftfiddle/swiftfiddle-runner:latest
32
+ docker rename swiftfiddle-runner swiftfiddle-runner_
33
+ docker stop swiftfiddle-runner_
34
+ docker run -d --rm -p 80:8080 --name swiftfiddle-runner swiftfiddle/swiftfiddle-runner
35
+ docker image prune -f
You can’t perform that action at this time.
0 commit comments