mirror of
https://github.com/hazemKrimi/touch-programming.git
synced 2026-05-01 18:20:26 +00:00
Manually setup SSH
This commit is contained in:
@@ -34,16 +34,25 @@ jobs:
|
|||||||
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
|
# - name: Setup SSH
|
||||||
uses: webfactory/ssh-agent@v0.5.3
|
# uses: webfactory/ssh-agent@v0.5.3
|
||||||
with:
|
# with:
|
||||||
ssh-private-key: ${{ secrets.DEPLOY_SSH_KEY }}
|
# ssh-private-key: ${{ secrets.DEPLOY_SSH_KEY }}
|
||||||
|
|
||||||
- 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
|
||||||
|
echo $DEPLOY_SSH_KEY > ~/.ssh/id_deploy
|
||||||
|
chmod 600 ~/.ssh/id_deploy
|
||||||
|
|
||||||
|
echo "Host *" > ~/.ssh/config
|
||||||
|
echo " StrictHostKeyChecking no" >> ~/.ssh/config
|
||||||
|
echo " UserKnownHostsFile /dev/null" >> ~/.ssh/config
|
||||||
|
|
||||||
ssh-keyscan -H $HOST > ~/.ssh/known_hosts
|
ssh-keyscan -H $HOST > ~/.ssh/known_hosts
|
||||||
|
|
||||||
scp -r client/build $USER@$HOST:/var/www/touch-programming.hazemkrimi.tech/public
|
scp -r client/build $USER@$HOST:/var/www/touch-programming.hazemkrimi.tech/public
|
||||||
scp server/executable $USER@$HOST:/var/www/touch-programming.hazemkrimi.tech/api
|
scp server/executable $USER@$HOST:/var/www/touch-programming.hazemkrimi.tech/api
|
||||||
|
|||||||
Reference in New Issue
Block a user