Skip to content

Commit a3593de

Browse files
authored
ci: init ssh-agent properly (#1374)
Signed-off-by: Luca Zaninotto <luca.zaninotto@secomind.com>
1 parent b132704 commit a3593de

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

.github/actions/doc-publish/action.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ inputs:
3030
runs:
3131
using: "composite"
3232
steps:
33+
- name: Setup SSH
34+
- uses: webfactory/ssh-agent@v0.10.0
35+
with:
36+
ssh-private-key: ${{ secrets.publish-key }}
3337
- name: Commit files
3438
working-directory: ${{ inputs.docs }}
3539
shell: bash
@@ -39,13 +43,9 @@ runs:
3943
git add .
4044
git commit -m "Update Documentation"
4145
- name: Push changes
42-
working-directory: ./docs
46+
working-directory: ${{ inputs.docs }}
4347
shell: bash
4448
run: |
45-
eval `ssh-agent -t 60 -s`
46-
echo "${{ inputs.deploy-key }}" | ssh-add -
47-
mkdir -p ~/.ssh/
48-
ssh-keyscan github.com >> ~/.ssh/known_hosts
4949
git remote add topush "git@github.com:edgehog-device-manager/docs.git"
5050
git fetch topush
5151
git push topush main

0 commit comments

Comments
 (0)