mirror of
https://github.com/deployphp/action.git
synced 2025-04-01 19:06:35 +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`.
|
# `deploy all`.
|
||||||
# Required.
|
# Required.
|
||||||
dep: deploy
|
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.
|
# Config options for the Deployer. Same as the `-o` flag in the CLI.
|
||||||
# Optional.
|
# Optional.
|
||||||
|
|
|
@ -8,6 +8,11 @@ inputs:
|
||||||
required: true
|
required: true
|
||||||
description: The command.
|
description: The command.
|
||||||
|
|
||||||
|
sub-directory:
|
||||||
|
required: false
|
||||||
|
default: ''
|
||||||
|
description: Specifies a sub directory within the repository to deploy.
|
||||||
|
|
||||||
options:
|
options:
|
||||||
required: false
|
required: false
|
||||||
default: ''
|
default: ''
|
||||||
|
|
5
index.js
5
index.js
|
@ -52,6 +52,11 @@ async function ssh() {
|
||||||
|
|
||||||
async function dep() {
|
async function dep() {
|
||||||
let dep = core.getInput('deployer-binary')
|
let dep = core.getInput('deployer-binary')
|
||||||
|
let subDirectory = core.getInput('sub-directory').trim()
|
||||||
|
|
||||||
|
if (subDirectory !== '') {
|
||||||
|
cd(subDirectory)
|
||||||
|
}
|
||||||
|
|
||||||
if (dep === '')
|
if (dep === '')
|
||||||
for (let c of ['vendor/bin/deployer.phar', 'vendor/bin/dep', 'deployer.phar']) {
|
for (let c of ['vendor/bin/deployer.phar', 'vendor/bin/dep', 'deployer.phar']) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue