Skip to content

Commit d16ce76

Browse files
Create deploy-vpn.yml
1 parent 5231958 commit d16ce76

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/deploy-vpn.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Deploy VPN
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
vpn_ip_address:
7+
description: 'vpn_ip_address'
8+
required: true
9+
default: '192.0.2.1'
10+
ssh_username:
11+
description: 'ssh_username'
12+
required: true
13+
default: 'root'
14+
jobs:
15+
build:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v2
21+
22+
- name: Setting up SSH key
23+
uses: webfactory/ssh-agent@v0.8.0
24+
with:
25+
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
26+
27+
- name: SSH into remote host
28+
run: |
29+
ssh -o StrictHostKeyChecking=no ${{ inputs.ssh_username }}@${{ inputs.vpn_ip_address }} "date"

0 commit comments

Comments
 (0)