mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
Adjustments
This commit is contained in:
parent
8912f4fdb3
commit
99e98da995
12
src/git.ts
12
src/git.ts
@ -31,10 +31,12 @@ export async function init(action: ActionInterface): Promise<void | Error> {
|
||||
|
||||
try {
|
||||
await execute(`git remote rm origin`, action.workspace, action.silent)
|
||||
} finally {
|
||||
|
||||
if (action.isTest) {
|
||||
info('Attempted to remove origin…')
|
||||
throw new Error()
|
||||
}
|
||||
} catch {
|
||||
info('Attempted to remove origin but failed, continuing…')
|
||||
}
|
||||
|
||||
await execute(
|
||||
@ -183,10 +185,12 @@ export async function deploy(action: ActionInterface): Promise<Status> {
|
||||
|
||||
try {
|
||||
await execute(`git stash apply`, action.workspace, action.silent)
|
||||
} finally {
|
||||
|
||||
if (action.isTest) {
|
||||
info('Attempted to apply stash…')
|
||||
throw new Error()
|
||||
}
|
||||
} catch {
|
||||
info('Unable to apply from stash, continuing…')
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user