Remove git

This commit is contained in:
James Ives 2019-11-10 13:48:07 -05:00
parent d8a8b79095
commit f81e60d8ad
2 changed files with 6 additions and 1 deletions

View File

@ -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. */

View File

@ -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. */