Skip to content

Commit

Permalink
Merge branch 'dev' into releases/v4
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesIves committed Aug 26, 2021
2 parents 5dc1d5a + b4b3776 commit 266436c
Show file tree
Hide file tree
Showing 6 changed files with 343 additions and 321 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -347,4 +347,4 @@ If you wish to remove these files you must go into the deployment branch directl

This project would not be possible without all of our fantastic [contributors](https://github.com/JamesIves/github-pages-deploy-action/graphs/contributors) and [sponsors](https://github.com/sponsors/JamesIves). If you'd like to support the maintenance and upkeep of this project you can [donate via GitHub Sponsors](https://github.com/sponsors/JamesIves).

<!-- sponsors --><a href="https://github.com/MattWillFlood"><img src="https://github.com/MattWillFlood.png" width="50px" alt="" /></a><!-- sponsors -->
<!-- sponsors --><a href="https://github.com/milanpollock"><img src="https://github.com/milanpollock.png" width="50px" alt="" /></a><!-- sponsors -->
6 changes: 3 additions & 3 deletions __tests__/git.test.ts
Expand Up @@ -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)
})

Expand All @@ -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)
})

Expand All @@ -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)
})

Expand Down
2 changes: 1 addition & 1 deletion action.yml
Expand Up @@ -69,7 +69,7 @@ inputs:
required: false

repository-name:
description: 'Allows you to speicfy a different repository path so long as you have permissions to push to it. This should be formatted like so: JamesIves/github-pages-deploy-action'
description: 'Allows you to specify a different repository path so long as you have permissions to push to it. This should be formatted like so: JamesIves/github-pages-deploy-action'
required: false

workspace:
Expand Down
28 changes: 14 additions & 14 deletions package.json
Expand Up @@ -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.1.3",
"version": "4.1.4",
"license": "MIT",
"main": "lib/lib.js",
"types": "lib/lib.d.ts",
Expand Down Expand Up @@ -33,25 +33,25 @@
"deployment"
],
"dependencies": {
"@actions/core": "1.3.0",
"@actions/exec": "1.0.4",
"@actions/core": "1.5.0",
"@actions/exec": "1.1.0",
"@actions/github": "5.0.0",
"@actions/io": "1.1.0"
"@actions/io": "1.1.1"
},
"devDependencies": {
"@types/jest": "26.0.23",
"@types/node": "15.12.0",
"@typescript-eslint/eslint-plugin": "4.26.0",
"@typescript-eslint/parser": "4.26.0",
"eslint": "7.27.0",
"@types/jest": "27.0.1",
"@types/node": "16.7.2",
"@typescript-eslint/eslint-plugin": "4.29.3",
"@typescript-eslint/parser": "4.29.3",
"eslint": "7.32.0",
"eslint-config-prettier": "8.3.0",
"eslint-plugin-jest": "24.3.6",
"eslint-plugin-prettier": "3.4.0",
"eslint-plugin-jest": "24.4.0",
"eslint-plugin-prettier": "3.4.1",
"jest": "26.6.3",
"jest-circus": "27.0.4",
"prettier": "2.3.0",
"jest-circus": "27.0.6",
"prettier": "2.3.2",
"rimraf": "3.0.2",
"ts-jest": "26.5.6",
"typescript": "4.3.2"
"typescript": "4.3.5"
}
}
8 changes: 8 additions & 0 deletions src/git.ts
Expand Up @@ -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
Expand Down

0 comments on commit 266436c

Please sign in to comment.