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
12
src/git.ts
12
src/git.ts
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user