File tree Expand file tree Collapse file tree 1 file changed +64
-0
lines changed
Expand file tree Collapse file tree 1 file changed +64
-0
lines changed Original file line number Diff line number Diff line change 1+ name : " Test action"
2+ description : " Just for testing"
3+ author : " Tim Child"
4+
5+ inputs :
6+ vps-ip :
7+ description : " The IP address of the VPS that is set up as a webserver"
8+ required : true
9+ type : string
10+ site-name :
11+ description : " The name of the site to deploy (same as when initializing the site, usually a single word)"
12+ required : true
13+ type : string
14+ ssh-user :
15+ description : " The user to connect to the VPS as (defaults to 'webadmin')"
16+ default : " webadmin"
17+ required : false
18+ type : string
19+ ssh-private-key :
20+ description : " The private ssh key that grants access to the VPS"
21+ required : true
22+ type : string
23+
24+ runs :
25+ using : " composite"
26+ steps :
27+ - name : Check variables set
28+ shell : bash
29+ run : |
30+ if [ -z "${{ inputs.ssh-private-key }}" ]; then
31+ echo "ssh-private-key is not set"
32+ exit 1
33+ fi
34+ if [ -z "${{ inputs.vps-ip }}" ]; then
35+ echo "vps-ip is not set"
36+ exit 1
37+ fi
38+ if [ -z "${{ inputs.site-name }}" ]; then
39+ echo "site-name is not set"
40+ exit 1
41+ fi
42+ - name : Temp debugging
43+ shell : bash
44+ run : |
45+ pwd
46+ ls -la
47+
48+ - name : Create dummy file
49+ shell : bash
50+ run : |
51+ echo "Hello, world!" > hello.txt
52+ ls -la
53+ cat hello.txt
54+
55+ - name : Send dummy file to server
56+ 57+ with :
58+ host : ${{ inputs.vps-ip }}
59+ username : ${{ inputs.ssh-user }}
60+ key : ${{ inputs.ssh-private-key }}
61+ port : 22
62+ source : hello.txt
63+ target : scratch
64+ overwrite : true
You can’t perform that action at this time.
0 commit comments