-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (36 loc) · 1.06 KB
/
copy-to-remote.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Copy Docs to Remote
on:
# push:
# branches:
# - main
workflow_dispatch:
jobs:
copy-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY_DWARSHUIS }}
- name: Add Known Hosts
run: |
echo "${{ secrets.SSH_KNOWN_HOSTS_DWARSHUIS }}" >> ~/.ssh/known_hosts
- name: Install expect
run: |
sudo apt-get update
sudo apt-get install -y expect
- name: Add SSH Key with Passphrase
run: |
/usr/bin/expect <<EOF
spawn ssh-add -
expect "Enter passphrase for"
send "${{ secrets.SSH_PASSPHRASE_DWARSHUIS }}\r"
expect eof
EOF
- name: Copy /docs to Remote
run: |
scp -r ./docs [email protected]:/test/spec-up-t-demo-on-documentation-website
env:
SSH_KNOWN_HOSTS: ${{ secrets.SSH_KNOWN_HOSTS_DWARSHUIS }}