mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
Merge branch 'dev' into releases/v3
This commit is contained in:
commit
470419049a
@ -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.
|
||||
|
@ -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'
|
@ -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. */
|
||||
|
@ -12,7 +12,7 @@ let output: string
|
||||
export async function execute(
|
||||
cmd: string,
|
||||
cwd: string,
|
||||
silent?: boolean
|
||||
silent: boolean
|
||||
): Promise<any> {
|
||||
output = ''
|
||||
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user