Skip to content

Commit abda79f

Browse files
deploy script
1 parent 6ae515f commit abda79f

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
- name: SSH and Deploy Docker Image
13+
uses: appleboy/[email protected]
14+
with:
15+
host: ${{ secrets.SSH_HOST }}
16+
username: ${{ secrets.SSH_USER }}
17+
key: ${{ secrets.SSH_KEY }}
18+
ssh_args: "-o StrictHostKeyChecking=no"
19+
script: |
20+
docker pull swiftfiddle/swiftfiddle-lsp:latest
21+
docker stop swiftfiddle-lsp || true
22+
docker rm swiftfiddle-lsp || true
23+
docker run -d --rm -p 80:8080 --name swiftfiddle-lsp swiftfiddle/swiftfiddle-lsp
24+
docker image prune

0 commit comments

Comments
 (0)