mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
Update git.ts
This commit is contained in:
parent
906ad446aa
commit
de8fe44d5d
14
src/git.ts
14
src/git.ts
@ -149,20 +149,22 @@ export async function deploy(action: ActionInterface): Promise<Status> {
|
|||||||
// Checks out the base branch to begin the deployment process.
|
// Checks out the base branch to begin the deployment process.
|
||||||
await switchToBaseBranch(action)
|
await switchToBaseBranch(action)
|
||||||
|
|
||||||
|
await execute(
|
||||||
|
`git fetch ${action.repositoryPath}`,
|
||||||
|
action.workspace,
|
||||||
|
action.silent
|
||||||
|
)
|
||||||
|
|
||||||
if (action.lfs) {
|
if (action.lfs) {
|
||||||
// Migrates data from LFS so it can be comitted the "normal" way.
|
// Migrates data from LFS so it can be comitted the "normal" way.
|
||||||
|
info(`Migrating from Git LFS… ⚓`)
|
||||||
await execute(
|
await execute(
|
||||||
`git lfs migrate export --include="*"`,
|
`git lfs migrate export --include="*"`,
|
||||||
action.workspace,
|
action.workspace,
|
||||||
action.silent
|
action.silent
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
await execute(
|
|
||||||
`git fetch ${action.repositoryPath}`,
|
|
||||||
action.workspace,
|
|
||||||
action.silent
|
|
||||||
)
|
|
||||||
await execute(
|
await execute(
|
||||||
`git worktree add --checkout ${temporaryDeploymentDirectory} origin/${action.branch}`,
|
`git worktree add --checkout ${temporaryDeploymentDirectory} origin/${action.branch}`,
|
||||||
action.workspace,
|
action.workspace,
|
||||||
|
Loading…
Reference in New Issue
Block a user