Skip to content

Commit fa55771

Browse files
authored
Update push.yml (#71)
1 parent 21721e6 commit fa55771

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

Diff for: .github/workflows/push.yml

+9-8
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,12 @@ jobs:
4242
ARGS="-avh --delete"
4343
USERNAME=risa
4444
SERVER_DESTINATION=/home/risa/r-isa
45-
SSHPATH=$HOME/.ssh
46-
rm -rf $SSHPATH
47-
mkdir $SSHPATH
48-
echo "${{ secrets.SSH_PRIVATE_KEY }}" > $SSHPATH/key
49-
chmod 600 $SSHPATH/key
45+
46+
echo Setting up SSH key
47+
mkdir -p ~/.ssh
48+
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
49+
chmod 600 ~/.ssh/id_rsa
50+
5051
5152
echo Opening tunnel
5253
az network bastion tunnel --name ${{ secrets.BASTION_NAME }} --resource-group ${{ secrets.RESOURCE_GROUP }} --target-resource-id ${{ secrets.RESOURCE_ID }} --resource-port 22 --port 50022 &
@@ -56,15 +57,15 @@ jobs:
5657
5758
echo Upload new libraries
5859
FOLDER=build/install/risa/lib
59-
rsync $ARGS -e 'ssh -i $SSHPATH/key -o StrictHostKeyChecking=no -p 50022' $GITHUB_WORKSPACE/$FOLDER [email protected]:$SERVER_DESTINATION
60+
rsync $ARGS -e 'ssh -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no -p 50022' $GITHUB_WORKSPACE/$FOLDER [email protected]:$SERVER_DESTINATION
6061
6162
echo Upload new binaries
6263
FOLDER=build/install/risa/bin
63-
rsync $ARGS $GITHUB_WORKSPACE/$FOLDER [email protected]:$SERVER_DESTINATION
64+
rsync $ARGS -e 'ssh -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no -p 50022' $GITHUB_WORKSPACE/$FOLDER [email protected]:$SERVER_DESTINATION
6465
6566
echo Upload new configuration
6667
FOLDER=risa.yml
67-
rsync $ARGS $GITHUB_WORKSPACE/$FOLDER [email protected]:$SERVER_DESTINATION
68+
rsync $ARGS -e 'ssh -i ~/.ssh/id_rsa -o StrictHostKeyChecking=no -p 50022' $GITHUB_WORKSPACE/$FOLDER [email protected]:$SERVER_DESTINATION
6869
6970
echo Run internal deploy script
7071
/usr/bin/screen -ls | /bin/egrep 'Detached|Attached' | /usr/bin/cut -d. -f1 | /usr/bin/awk '{print $1}' | /usr/bin/xargs /bin/kill

0 commit comments

Comments
 (0)