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/v4
This commit is contained in:
commit
7cde9b7836
@ -168,7 +168,7 @@ describe('git', () => {
|
|||||||
const response = await deploy(action)
|
const response = await deploy(action)
|
||||||
|
|
||||||
// Includes the call to generateWorktree
|
// Includes the call to generateWorktree
|
||||||
expect(execute).toBeCalledTimes(13)
|
expect(execute).toBeCalledTimes(14)
|
||||||
expect(rmRF).toBeCalledTimes(1)
|
expect(rmRF).toBeCalledTimes(1)
|
||||||
expect(response).toBe(Status.SUCCESS)
|
expect(response).toBe(Status.SUCCESS)
|
||||||
})
|
})
|
||||||
@ -191,7 +191,7 @@ describe('git', () => {
|
|||||||
const response = await deploy(action)
|
const response = await deploy(action)
|
||||||
|
|
||||||
// Includes the call to generateWorktree
|
// Includes the call to generateWorktree
|
||||||
expect(execute).toBeCalledTimes(12)
|
expect(execute).toBeCalledTimes(13)
|
||||||
expect(rmRF).toBeCalledTimes(1)
|
expect(rmRF).toBeCalledTimes(1)
|
||||||
expect(response).toBe(Status.SUCCESS)
|
expect(response).toBe(Status.SUCCESS)
|
||||||
})
|
})
|
||||||
@ -216,7 +216,7 @@ describe('git', () => {
|
|||||||
await deploy(action)
|
await deploy(action)
|
||||||
|
|
||||||
// Includes the call to generateWorktree
|
// Includes the call to generateWorktree
|
||||||
expect(execute).toBeCalledTimes(13)
|
expect(execute).toBeCalledTimes(14)
|
||||||
expect(rmRF).toBeCalledTimes(1)
|
expect(rmRF).toBeCalledTimes(1)
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -240,7 +240,7 @@ describe('git', () => {
|
|||||||
await deploy(action)
|
await deploy(action)
|
||||||
|
|
||||||
// Includes the call to generateWorktree
|
// Includes the call to generateWorktree
|
||||||
expect(execute).toBeCalledTimes(12)
|
expect(execute).toBeCalledTimes(13)
|
||||||
expect(rmRF).toBeCalledTimes(1)
|
expect(rmRF).toBeCalledTimes(1)
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -265,7 +265,7 @@ describe('git', () => {
|
|||||||
await deploy(action)
|
await deploy(action)
|
||||||
|
|
||||||
// Includes the call to generateWorktree
|
// Includes the call to generateWorktree
|
||||||
expect(execute).toBeCalledTimes(12)
|
expect(execute).toBeCalledTimes(13)
|
||||||
expect(rmRF).toBeCalledTimes(1)
|
expect(rmRF).toBeCalledTimes(1)
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -296,7 +296,7 @@ describe('git', () => {
|
|||||||
const response = await deploy(action)
|
const response = await deploy(action)
|
||||||
|
|
||||||
// Includes the call to generateWorktree
|
// Includes the call to generateWorktree
|
||||||
expect(execute).toBeCalledTimes(13)
|
expect(execute).toBeCalledTimes(14)
|
||||||
expect(rmRF).toBeCalledTimes(1)
|
expect(rmRF).toBeCalledTimes(1)
|
||||||
expect(fs.existsSync).toBeCalledTimes(2)
|
expect(fs.existsSync).toBeCalledTimes(2)
|
||||||
expect(response).toBe(Status.SUCCESS)
|
expect(response).toBe(Status.SUCCESS)
|
||||||
@ -328,7 +328,7 @@ describe('git', () => {
|
|||||||
await deploy(action)
|
await deploy(action)
|
||||||
|
|
||||||
// Includes the call to generateWorktree
|
// Includes the call to generateWorktree
|
||||||
expect(execute).toBeCalledTimes(10)
|
expect(execute).toBeCalledTimes(11)
|
||||||
expect(rmRF).toBeCalledTimes(1)
|
expect(rmRF).toBeCalledTimes(1)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -353,7 +353,7 @@ describe('git', () => {
|
|||||||
await deploy(action)
|
await deploy(action)
|
||||||
|
|
||||||
// Includes the call to generateWorktree
|
// Includes the call to generateWorktree
|
||||||
expect(execute).toBeCalledTimes(10)
|
expect(execute).toBeCalledTimes(11)
|
||||||
expect(rmRF).toBeCalledTimes(1)
|
expect(rmRF).toBeCalledTimes(1)
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -373,7 +373,7 @@ describe('git', () => {
|
|||||||
|
|
||||||
await deploy(action)
|
await deploy(action)
|
||||||
|
|
||||||
expect(execute).toBeCalledTimes(10)
|
expect(execute).toBeCalledTimes(11)
|
||||||
expect(rmRF).toBeCalledTimes(1)
|
expect(rmRF).toBeCalledTimes(1)
|
||||||
expect(mkdirP).toBeCalledTimes(1)
|
expect(mkdirP).toBeCalledTimes(1)
|
||||||
})
|
})
|
||||||
@ -393,7 +393,7 @@ describe('git', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const response = await deploy(action)
|
const response = await deploy(action)
|
||||||
expect(execute).toBeCalledTimes(10)
|
expect(execute).toBeCalledTimes(11)
|
||||||
expect(rmRF).toBeCalledTimes(1)
|
expect(rmRF).toBeCalledTimes(1)
|
||||||
expect(response).toBe(Status.SKIPPED)
|
expect(response).toBe(Status.SKIPPED)
|
||||||
})
|
})
|
||||||
|
@ -53,7 +53,7 @@ describe('main', () => {
|
|||||||
debug: true
|
debug: true
|
||||||
})
|
})
|
||||||
await run(action)
|
await run(action)
|
||||||
expect(execute).toBeCalledTimes(17)
|
expect(execute).toBeCalledTimes(18)
|
||||||
expect(rmRF).toBeCalledTimes(1)
|
expect(rmRF).toBeCalledTimes(1)
|
||||||
expect(exportVariable).toBeCalledTimes(1)
|
expect(exportVariable).toBeCalledTimes(1)
|
||||||
})
|
})
|
||||||
@ -73,7 +73,7 @@ describe('main', () => {
|
|||||||
isTest: TestFlag.HAS_CHANGED_FILES
|
isTest: TestFlag.HAS_CHANGED_FILES
|
||||||
})
|
})
|
||||||
await run(action)
|
await run(action)
|
||||||
expect(execute).toBeCalledTimes(20)
|
expect(execute).toBeCalledTimes(21)
|
||||||
expect(rmRF).toBeCalledTimes(1)
|
expect(rmRF).toBeCalledTimes(1)
|
||||||
expect(exportVariable).toBeCalledTimes(1)
|
expect(exportVariable).toBeCalledTimes(1)
|
||||||
})
|
})
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"name": "@jamesives/github-pages-deploy-action",
|
"name": "@jamesives/github-pages-deploy-action",
|
||||||
"description": "GitHub action for building a project and deploying it to GitHub pages.",
|
"description": "GitHub action for building a project and deploying it to GitHub pages.",
|
||||||
"author": "James Ives <iam@jamesiv.es> (https://jamesiv.es)",
|
"author": "James Ives <iam@jamesiv.es> (https://jamesiv.es)",
|
||||||
"version": "4.3.0",
|
"version": "4.3.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"main": "lib/lib.js",
|
"main": "lib/lib.js",
|
||||||
"types": "lib/lib.d.ts",
|
"types": "lib/lib.d.ts",
|
||||||
|
@ -130,6 +130,13 @@ export async function deploy(action: ActionInterface): Promise<Status> {
|
|||||||
|
|
||||||
await generateWorktree(action, temporaryDeploymentDirectory, branchExists)
|
await generateWorktree(action, temporaryDeploymentDirectory, branchExists)
|
||||||
|
|
||||||
|
/* Relaxes permissions of folder due to be deployed so rsync can write to/from it. */
|
||||||
|
await execute(
|
||||||
|
`chmod -R +rw ${action.folderPath}`,
|
||||||
|
action.workspace,
|
||||||
|
action.silent
|
||||||
|
)
|
||||||
|
|
||||||
// Ensures that items that need to be excluded from the clean job get parsed.
|
// Ensures that items that need to be excluded from the clean job get parsed.
|
||||||
let excludes = ''
|
let excludes = ''
|
||||||
if (action.clean && action.cleanExclude) {
|
if (action.clean && action.cleanExclude) {
|
||||||
@ -324,7 +331,7 @@ export async function deploy(action: ActionInterface): Promise<Status> {
|
|||||||
)
|
)
|
||||||
|
|
||||||
await execute(
|
await execute(
|
||||||
`chmod -R 777 ${temporaryDeploymentDirectory}`,
|
`chmod -R +rw ${temporaryDeploymentDirectory}`,
|
||||||
action.workspace,
|
action.workspace,
|
||||||
action.silent
|
action.silent
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user