Skip to content

Commit aefff1b

Browse files
committed
chore: adding action for doing everything with the ssh key
1 parent a5fe94a commit aefff1b

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

.github/workflows/deploy-to-vps.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,15 @@ jobs:
3838
run: |
3939
mkdir images
4040
docker save milk-folio_backend:latest milk-folio_webview:latest > ./images/images.tar
41-
- name: rsync deployments
42-
uses: burnett01/rsync-deployments@7.1.0
41+
42+
# this for the deployment of the images
43+
- name: Install SSH Key
44+
uses: shimataro/ssh-key-action@v2
4345
with:
44-
switches: -avzr --delete
45-
path: images/
46-
remote_path: /home/ec2-user/
47-
remote_host: ${{ secrets.VPS_HOST }}
48-
remote_user: ${{ secrets.VPS_USER }}
49-
remote_key: ${{ secrets.VPS_SSH_KEY }}
46+
key: ${{ secrets.VPS_SSH_KEY }}
47+
48+
- name: Adding Known Hosts
49+
run: ssh-keyscan -H ${{ secrets.VPS_HOST }} >> ~/.ssh/known_hosts
5050

51+
- name: Deploy with rsync
52+
run: rsync -avz ./images/ ${{ secrets.VPS_USER }}@${{ secrets.VPS_HOST }}:/home/ec2-user/

0 commit comments

Comments
 (0)