mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2026-05-31 00:12:03 +08:00
Merge branch 'dev' into releases/v4
This commit is contained in:
@@ -54,7 +54,7 @@ describe('git', () => {
|
||||
})
|
||||
|
||||
await init(action)
|
||||
expect(execute).toHaveBeenCalledTimes(8)
|
||||
expect(execute).toHaveBeenCalledTimes(7)
|
||||
})
|
||||
|
||||
it('should catch when a function throws an error', async () => {
|
||||
@@ -101,7 +101,7 @@ describe('git', () => {
|
||||
})
|
||||
|
||||
await init(action)
|
||||
expect(execute).toHaveBeenCalledTimes(8)
|
||||
expect(execute).toHaveBeenCalledTimes(7)
|
||||
})
|
||||
|
||||
it('should not unset git config if a user is using ssh', async () => {
|
||||
@@ -123,7 +123,7 @@ describe('git', () => {
|
||||
})
|
||||
|
||||
await init(action)
|
||||
expect(execute).toHaveBeenCalledTimes(7)
|
||||
expect(execute).toHaveBeenCalledTimes(6)
|
||||
|
||||
process.env.CI = undefined
|
||||
})
|
||||
@@ -144,7 +144,7 @@ describe('git', () => {
|
||||
})
|
||||
|
||||
await init(action)
|
||||
expect(execute).toHaveBeenCalledTimes(8)
|
||||
expect(execute).toHaveBeenCalledTimes(7)
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ describe('main', () => {
|
||||
debug: true
|
||||
})
|
||||
await run(action)
|
||||
expect(execute).toHaveBeenCalledTimes(19)
|
||||
expect(execute).toHaveBeenCalledTimes(18)
|
||||
expect(rmRF).toHaveBeenCalledTimes(1)
|
||||
expect(exportVariable).toHaveBeenCalledTimes(1)
|
||||
})
|
||||
@@ -73,7 +73,7 @@ describe('main', () => {
|
||||
isTest: TestFlag.HAS_CHANGED_FILES
|
||||
})
|
||||
await run(action)
|
||||
expect(execute).toHaveBeenCalledTimes(22)
|
||||
expect(execute).toHaveBeenCalledTimes(21)
|
||||
expect(rmRF).toHaveBeenCalledTimes(1)
|
||||
expect(exportVariable).toHaveBeenCalledTimes(1)
|
||||
})
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "@jamesives/github-pages-deploy-action",
|
||||
"description": "GitHub action for building a project and deploying it to GitHub pages.",
|
||||
"author": "James Ives <iam@jamesiv.es> (https://jamesiv.es)",
|
||||
"version": "4.6.4",
|
||||
"version": "4.6.5",
|
||||
"license": "MIT",
|
||||
"main": "lib/lib.js",
|
||||
"types": "lib/lib.d.ts",
|
||||
|
||||
17
src/git.ts
17
src/git.ts
@@ -24,22 +24,7 @@ export async function init(action: ActionInterface): Promise<void | Error> {
|
||||
info('Configuring git…')
|
||||
|
||||
/**
|
||||
* Add safe directory to the global git config.
|
||||
*/
|
||||
try {
|
||||
await execute(
|
||||
`git config --global safe.directory '*'`,
|
||||
action.workspace,
|
||||
action.silent
|
||||
)
|
||||
} catch {
|
||||
info('Unable to set workflow file tree as a safe directory…')
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensure that the workspace is a safe directory, this is somewhat redundant as the action
|
||||
* will always set the workspace as a safe directory, but this is a fallback in case the action
|
||||
* fails to do so.
|
||||
* Ensure that the workspace is a safe directory.
|
||||
*/
|
||||
try {
|
||||
await execute(
|
||||
|
||||
Reference in New Issue
Block a user