mirror of
https://github.com/deployphp/action.git
synced 2025-03-31 02:16:36 +00:00
Add support to subdirectories
This commit is contained in:
parent
e71b9feeeb
commit
18d067dad8
3 changed files with 13 additions and 0 deletions
|
@ -18,6 +18,9 @@
|
|||
# `deploy all`.
|
||||
# Required.
|
||||
dep: deploy
|
||||
|
||||
# Specifies a sub directory within the repository to deploy
|
||||
sub-directory: "..."
|
||||
|
||||
# Config options for the Deployer. Same as the `-o` flag in the CLI.
|
||||
# Optional.
|
||||
|
|
|
@ -8,6 +8,11 @@ inputs:
|
|||
required: true
|
||||
description: The command.
|
||||
|
||||
sub-directory:
|
||||
required: false
|
||||
default: ''
|
||||
description: Specifies a sub directory within the repository to deploy.
|
||||
|
||||
options:
|
||||
required: false
|
||||
default: ''
|
||||
|
|
5
index.js
5
index.js
|
@ -52,6 +52,11 @@ async function ssh() {
|
|||
|
||||
async function dep() {
|
||||
let dep = core.getInput('deployer-binary')
|
||||
let subDirectory = core.getInput('sub-directory').trim()
|
||||
|
||||
if (subDirectory !== '') {
|
||||
cd(subDirectory)
|
||||
}
|
||||
|
||||
if (dep === '')
|
||||
for (let c of ['vendor/bin/deployer.phar', 'vendor/bin/dep', 'deployer.phar']) {
|
||||
|
|
Loading…
Add table
Reference in a new issue