Skip to content

Commit f78a889

Browse files
authored
use home dir (#4)
1 parent 6ff68d6 commit f78a889

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
deploy:
77
type: boolean
88
default: false
9+
dry_run:
10+
type: boolean
11+
default: false
912

1013
workflow_dispatch:
1114
inputs:
@@ -45,9 +48,10 @@ jobs:
4548
- name: Deploy
4649
if: inputs.deploy
4750
run: |
48-
mkdir -p /root/.ssh
49-
echo "${{ secrets.JOIN_DEPLOY_KNOWN_HOST }}" >> /root/.ssh/known_hosts
50-
chmod 600 /root/.ssh/known_hosts
51+
mkdir -p $HOME/.ssh
52+
chmod 700 $HOME/.ssh
53+
echo "${{ secrets.JOIN_DEPLOY_KNOWN_HOST }}" >> $HOME/.ssh/known_hosts
54+
chmod 600 $HOME/.ssh/known_hosts
5155
eval $(ssh-agent)
5256
echo "${{ secrets.JOIN_DEPLOY_KEY }}" | ssh-add -
5357
rsync -avz --delete ${{ inputs.dry_run && '--dry-run' || '' }} \

0 commit comments

Comments
 (0)