mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
Remove git
This commit is contained in:
parent
d8a8b79095
commit
f81e60d8ad
@ -87,6 +87,8 @@ function deploy() {
|
||||
yield util_1.execute(`git switch ${constants_1.action.baseBranch || "master"}`, constants_1.workspace);
|
||||
yield util_1.execute(`git fetch origin`, constants_1.workspace);
|
||||
yield util_1.execute(`git worktree add --checkout ${temporaryDeploymentDirectory} origin/${constants_1.action.branch}`, constants_1.workspace);
|
||||
// Removes the git folder prior to moving.
|
||||
yield io_1.rmRF(`${constants_1.action.build}/.git`);
|
||||
/*
|
||||
Pushes all of the build files into the deployment directory.
|
||||
Allows the user to specify the root if '.' is provided. */
|
||||
|
@ -1,5 +1,5 @@
|
||||
import * as core from "@actions/core";
|
||||
import { cp } from "@actions/io";
|
||||
import { cp, rmRF } from "@actions/io";
|
||||
import { execute } from "./util";
|
||||
import { workspace, action, repositoryPath } from "./constants";
|
||||
|
||||
@ -81,6 +81,9 @@ export async function deploy(): Promise<any> {
|
||||
workspace
|
||||
);
|
||||
|
||||
// Removes the git folder prior to moving.
|
||||
await rmRF(`${action.build}/.git`)
|
||||
|
||||
/*
|
||||
Pushes all of the build files into the deployment directory.
|
||||
Allows the user to specify the root if '.' is provided. */
|
||||
|
Loading…
Reference in New Issue
Block a user