Skip to content

Commit 4cfd2dc

Browse files
committed
update ssh config and path
1 parent 433ea8e commit 4cfd2dc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/google-registry-gce-dev.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ jobs:
100100
mkdir -p $SSH_DIR
101101
echo "${{ secrets.GCP_SSH_PRIVATE_KEY }}" > $SSH_DIR/id_rsa
102102
chmod 600 $SSH_DIR/id_rsa
103-
ssh-keyscan -H ${{ vars.GCP_VM_IP }} >> $SSH_DIR/known_hosts
103+
ssh-keyscan -H ${{ vars.GCP_VM_IP }} -p ${{ env.SSH_PORT }} >> $SSH_DIR/known_hosts
104104
105105
# Define remote path
106106
REMOTE_PATH="/home/${{ secrets.GCP_VM_USER }}/${{ env.GCP_PROJECT_ID }}/${{ env.GCP_ARTIFACT_REGISTRY_NAME }}"
@@ -109,7 +109,7 @@ jobs:
109109
echo "Creating remote path"
110110
ssh -p ${{ env.SSH_PORT }} -i $SSH_DIR/id_rsa ${{ secrets.GCP_VM_USER }}@${{ vars.GCP_VM_IP }} "mkdir -p $REMOTE_PATH"
111111
echo "Sending files"
112-
scp -P ${{ env.SSH_PORT }} -i $SSH_DIR/id_rsa compose.yaml deploy_to_vm.sh ${{ secrets.GCP_VM_USER }}@${{ vars.GCP_VM_IP }}:$REMOTE_PATH
112+
scp -P ${{ env.SSH_PORT }} -i $SSH_DIR/id_rsa compose.yaml deploy_to_vm.sh ${{ secrets.GCP_VM_USER }}@${{ vars.GCP_VM_IP }}:"$REMOTE_PATH/"
113113
114114
echo "Deploy"
115115
# SSH into VM and execute deployment

0 commit comments

Comments
 (0)