Skip to content

Commit 090021b

Browse files
committed
update deploy workflow part 2
1 parent 5087037 commit 090021b

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

.github/workflows/deploy.yaml

+17
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,23 @@ jobs:
2626
cargo check
2727
cargo build --release
2828
29+
- name: Create ssh key
30+
run: |
31+
mkdir ~/.ssh
32+
echo "${{ secrets.PRIVATE_KEY }}" > ~/.ssh/index_key
33+
chmod 600 ~/.ssh/index_key
34+
35+
- name: Upload target to server
36+
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 }}
40+
41+
- name: Run update script
42+
run: |
43+
ssh -i ~/.ssh/index_key -o StrictHostKeyChecking=no ${{ secrets.INDEX_USER }}@${{ secrets.INDEX_SERVER }} \
44+
${{ secrets.INDEX_UPDATE_SCRIPT_PATH }}
45+
2946
# - name: Push Docker image to index server
3047
# run: |
3148
# mkdir -p ~/.ssh

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
/target
22
*.db
3-
.env
3+
.env
4+
5+
.vscode/settings.json

0 commit comments

Comments
 (0)