mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
Makes check (#332)
This commit is contained in:
parent
2ce22fae3a
commit
dce3848163
15
src/git.ts
15
src/git.ts
@ -19,11 +19,16 @@ export async function init(action: ActionInterface): Promise<void | Error> {
|
||||
await execute(`git init`, action.workspace)
|
||||
await execute(`git config user.name "${action.name}"`, action.workspace)
|
||||
await execute(`git config user.email "${action.email}"`, action.workspace)
|
||||
await execute(`git remote rm origin`, action.workspace)
|
||||
await execute(
|
||||
`git remote add origin ${action.repositoryPath}`,
|
||||
action.workspace
|
||||
)
|
||||
|
||||
try {
|
||||
await execute(`git remote rm origin`, action.workspace)
|
||||
} finally {
|
||||
await execute(
|
||||
`git remote add origin ${action.repositoryPath}`,
|
||||
action.workspace
|
||||
)
|
||||
}
|
||||
|
||||
await execute(`git fetch --no-recurse-submodules`, action.workspace)
|
||||
|
||||
info('Git configured… 🔧')
|
||||
|
Loading…
Reference in New Issue
Block a user