Skip to content

Commit 5ffe7d3

Browse files
committed
update github workflow
1 parent 6a4e827 commit 5ffe7d3

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

.github/workflows/deploy.yaml

+5-8
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,17 @@ jobs:
2828
2929
- name: Create ssh key
3030
run: |
31-
mkdir ~/.ssh
32-
echo "${{ secrets.PRIVATE_KEY }}" > ~/.ssh/index_key
33-
chmod 600 ~/.ssh/index_key
31+
install -m 600 -D /dev/null ~/.ssh/id_rsa
32+
echo "${{ secrets.PRIVATE_KEY }}" > ~/.ssh/id_rsa
33+
ssh-keyscan -H ${{ secrets.INDEX_SERVER }} > ~/.ssh/known_hosts
3434
3535
- name: Upload target to server
3636
run: |
37-
rsync -avz -e "ssh -i ~/.ssh/index_key -o StrictHostKeyChecking=no" \
38-
--progress target/release/geode-index \
39-
${{ secrets.INDEX_USER }}@${{ secrets.INDEX_SERVER }}:${{ secrets.INDEX_COPY_LOCATION }}
37+
rsync -avz target/release/geode-index ${{ secrets.INDEX_USER }}@${{ secrets.INDEX_SERVER }}:${{ secrets.INDEX_COPY_LOCATION }}
4038
4139
- name: Run update script
4240
run: |
43-
ssh -i ~/.ssh/index_key -o StrictHostKeyChecking=no ${{ secrets.INDEX_USER }}@${{ secrets.INDEX_SERVER }} \
44-
${{ secrets.INDEX_UPDATE_SCRIPT_PATH }}
41+
ssh ${{ secrets.INDEX_USER }}@${{ secrets.INDEX_SERVER }} ${{ secrets.INDEX_UPDATE_SCRIPT_PATH }}
4542
4643
# - name: Push Docker image to index server
4744
# run: |

0 commit comments

Comments
 (0)