Try another action from the GitHub marketplace

This commit is contained in:
2025-04-10 17:26:10 +01:00
parent e8a57d7353
commit 1a82edbed5
+9 -10
View File
@@ -33,19 +33,18 @@ jobs:
run: | run: |
cd server cd server
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o executable CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o executable
- name: Setup SSH
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.DEPLOY_SSH_KEY }}
known_hosts: hazemkrimi.tech
if_key_exists: ignore
- name: Deploy to VPS - name: Deploy to VPS
env: env:
HOST: hazemkrimi.tech HOST: hazemkrimi.tech
USER: deploy USER: deploy
run: | run: |
mkdir -p ~/.ssh scp -r client/build $USER@$HOST:/var/www/touch-programming.hazemkrimi.tech/public
echo $DEPLOY_SSH_KEY > ~/.ssh/id_deploy scp server/executable $USER@$HOST:/var/www/touch-programming.hazemkrimi.tech/api
chmod 600 ~/.ssh/id_deploy
echo "Host *" > ~/.ssh/config
echo " StrictHostKeyChecking no" >> ~/.ssh/config
echo " UserKnownHostsFile /dev/null" >> ~/.ssh/config
scp -i ~/.ssh/id_deploy -r client/build $USER@$HOST:/var/www/touch-programming.hazemkrimi.tech/public
scp -i ~/.ssh/id_deploy server/executable $USER@$HOST:/var/www/touch-programming.hazemkrimi.tech/api