Skip to content

Commit

Permalink
Combine SSH commands. Add SSH key from secrets.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnjcamilleri committed Apr 15, 2020
1 parent 62278fa commit 760468b
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
uses: golfzaptw/action-connect-ovpn@master
id: connect_vpn
with:
PING_URL: '10.249.1.100'
# PING_URL: '10.249.1.100'
FILE_OVPN: '.github/vpn/config.ovpn'
env:
CA_CRT: ${{ secrets.CA_CRT }}
Expand All @@ -26,14 +26,13 @@ jobs:
- name: Check Connect VPN
run: echo ${{ steps.connect_vpn.outputs.STATUS }}

# - name: Add host key to known_hosts
# run: mkdir -p ~/.ssh && ssh-keyscan 10.249.1.100 >> ~/.ssh/known_hosts

- name: Create SSH folder
run: mkdir -p ~/.ssh && chmod 700 ~/.ssh

- name: Copy SSH settings
run: cp .github/vpn/config.ssh ~/.ssh/config && chmod 600 ~/.ssh/config
- name: Setup SSH
run: |
mkdir -p ~/.ssh
chmod 700 ~/.ssh
cp .github/vpn/config.ssh ~/.ssh/config
chmod 600 ~/.ssh/config
ssh-add - <<< "${{ secrets.SSH_PRIVATE_KEY }}"
- name: Run deploy script
run: ./deploy.sh
Expand Down

0 comments on commit 760468b

Please sign in to comment.