Merge branch 'dev' into releases/v3

This commit is contained in:
James Ives 2020-06-26 14:10:35 -04:00
commit 470419049a
5 changed files with 9 additions and 4 deletions

View File

@ -147,7 +147,7 @@ In addition to the deployment options you must also configure the following.
| `CLEAN` | If your project generates hashed files on build you can use this option to automatically delete them from the deployment branch with each deploy. This option can be toggled on by setting it to `true`. | `with` | **No** |
| `CLEAN_EXCLUDE` | If you need to use `CLEAN` but you'd like to preserve certain files or folders you can use this option. This should be formatted as an array but stored as a string. For example: `'["filename.js", "folder"]'` | `with` | **No** |
| `SINGLE_COMMIT` | This option can be toggled to `true` if you'd prefer to have a single commit on the deployment branch instead of maintaining the full history. **Using this option will also cause any existing history to be wiped from the deployment branch**. | `with` | **No** |
| `SILENT` | Silences the action output preventing it from displaying git messages and error. | `with` | **No** |
| `SILENT` | Silences the action output preventing it from displaying git messages. | `with` | **No** |
| `WORKSPACE` | This should point to where your project lives on the virtual machine. The GitHub Actions environment will set this for you. It is only neccersary to set this variable if you're using the node module. | `with` | **No** |
With the action correctly configured you should see the workflow trigger the deployment under the configured conditions.

View File

@ -68,6 +68,10 @@ inputs:
description: "This option can be used if you'd prefer to have a single commit on the deployment branch instead of maintaining the full history."
required: false
SILENT:
description: "Silences the action output preventing it from displaying git messages."
required: false
outputs:
DEPLOYMENT_STATUS:
description: 'The status of the deployment that indicates if the run failed or passed. Possible outputs include: success|failed|skipped'

View File

@ -39,7 +39,7 @@ export interface ActionInterface {
/** Wipes the commit history from the deployment branch in favor of a single commit. */
singleCommit?: boolean | null
/** Determines if the action should run in silent mode or not. */
silent?: boolean
silent: boolean
/** Set to true if you're using an ssh client in your build step. */
ssh?: boolean | null
/** If you'd like to push the contents of the deployment folder into a specific directory on the deployment branch you can specify it here. */

View File

@ -12,7 +12,7 @@ let output: string
export async function execute(
cmd: string,
cwd: string,
silent?: boolean
silent: boolean
): Promise<any> {
output = ''

View File

@ -135,7 +135,8 @@ export async function deploy(action: ActionInterface): Promise<Status> {
*/
const branchExists = await execute(
`git ls-remote --heads ${action.repositoryPath} ${action.branch} | wc -l`,
action.workspace
action.workspace,
action.silent
)
if (!branchExists && !action.isTest) {