Update git.ts

This commit is contained in:
James Ives 2020-09-12 17:54:53 -04:00
parent 906ad446aa
commit de8fe44d5d

View File

@ -149,8 +149,15 @@ 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,
@ -158,11 +165,6 @@ export async function deploy(action: ActionInterface): Promise<Status> {
) )
} }
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,