mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
Single Commit Adjustments
This commit is contained in:
parent
c1da439fdd
commit
00fe98e4e5
@ -216,7 +216,7 @@ describe('git', () => {
|
||||
await deploy(action)
|
||||
|
||||
// Includes the call to generateWorktree
|
||||
expect(execute).toBeCalledTimes(11)
|
||||
expect(execute).toBeCalledTimes(12)
|
||||
expect(rmRF).toBeCalledTimes(1)
|
||||
})
|
||||
|
||||
@ -240,7 +240,7 @@ describe('git', () => {
|
||||
await deploy(action)
|
||||
|
||||
// Includes the call to generateWorktree
|
||||
expect(execute).toBeCalledTimes(10)
|
||||
expect(execute).toBeCalledTimes(11)
|
||||
expect(rmRF).toBeCalledTimes(1)
|
||||
})
|
||||
|
||||
@ -265,7 +265,7 @@ describe('git', () => {
|
||||
await deploy(action)
|
||||
|
||||
// Includes the call to generateWorktree
|
||||
expect(execute).toBeCalledTimes(10)
|
||||
expect(execute).toBeCalledTimes(11)
|
||||
expect(rmRF).toBeCalledTimes(1)
|
||||
})
|
||||
|
||||
|
@ -49,7 +49,7 @@ describe('main', () => {
|
||||
debug: true
|
||||
})
|
||||
await run(action)
|
||||
expect(execute).toBeCalledTimes(14)
|
||||
expect(execute).toBeCalledTimes(13)
|
||||
expect(rmRF).toBeCalledTimes(1)
|
||||
expect(exportVariable).toBeCalledTimes(1)
|
||||
})
|
||||
|
@ -143,6 +143,14 @@ export async function deploy(action: ActionInterface): Promise<Status> {
|
||||
action.silent
|
||||
)
|
||||
|
||||
if (action.singleCommit) {
|
||||
await execute(
|
||||
`git add --all .`,
|
||||
`${action.workspace}/${temporaryDeploymentDirectory}`,
|
||||
action.silent
|
||||
)
|
||||
}
|
||||
|
||||
// Use git status to check if we have something to commit.
|
||||
// Special case is singleCommit with existing history, when
|
||||
// we're really interested if the diff against the upstream branch
|
||||
|
Loading…
Reference in New Issue
Block a user