-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
72 lines (60 loc) · 2.11 KB
/
action.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Deploy (php-actions)
description: Deploy your application to servers or containers
inputs:
ssh_key:
description: The private key to use for SSH connection
required: false
hostname:
description: The hostname of the remote server to SSH to
required: true
port:
description: The port of the remote server to SSH to
required: true
default: "22"
user:
description: The SSH user to use for deployment
required: true
default: "deploy"
path:
description: Absolute path on the remote server to deploy into
required: true
default: "/app"
path_owner:
description: The user and group to change ownership of deployment path to after transfer
required: false
transfer_path:
description: Absolute path on the remote server to use for the transfer, which will contain a directory named as the current Git SHA
required: true
default: "/tmp/php-actions--deploy"
post_transfer_script:
description: Path that post-transfer script will be moved to for execution
required: true
default: "~/post-transfer.bash"
post_transfer_script_prefix:
description: Command to run post-transfer script with (defaults to sudo, set to blank string or other command)
required: true
default: "sudo"
after_command:
description: Command to execute after deployment
required: false
runs:
using: "composite"
steps:
- env:
ACTION_TOKEN: ${{ github.token }}
ACTION_SSH_KEY: ${{ inputs.ssh_key }}
ACTION_HOSTNAME: ${{ inputs.hostname }}
ACTION_PORT: ${{ inputs.port }}
ACTION_USER: ${{ inputs.user }}
ACTION_PATH: ${{ inputs.path }}
ACTION_TRANSFER_PATH: ${{ inputs.transfer_path }}
ACTION_PATH_OWNER: ${{ inputs.path_owner }}
ACTION_POST_TRANSFER_SCRIPT: ${{ inputs.post_transfer_script }}
ACTION_POST_TRANSFER_SCRIPT_PREFIX: ${{ inputs.post_transfer_script_prefix }}
ACTION_AFTER_COMMAND: ${{ inputs.after_command }}
id: deploy_run
run: ${{ github.action_path }}/deploy-action.bash
shell: bash
branding:
icon: "upload-cloud"
color: "purple"