Debugging

This commit is contained in:
James Ives 2019-11-10 16:09:40 -05:00
parent df3cf28e75
commit fc94a2604d
4 changed files with 4 additions and 4 deletions

View File

@ -14,7 +14,7 @@ exports.workspace = process.env.GITHUB_WORKSPACE;
exports.folder = core.getInput("FOLDER", { required: true });
// Required action data.
exports.action = {
build: exports.folder === '.' ? exports.workspace : exports.folder,
build: exports.folder,
gitHubRepository: repository ? repository.full_name : "",
gitHubToken: core.getInput("GITHUB_TOKEN"),
accessToken: core.getInput("ACCESS_TOKEN"),

View File

@ -97,7 +97,7 @@ function deploy() {
recursive: true,
force: true
});*/
yield util_1.execute(`rsync -av --progress ${constants_1.action.build}/. ${temporaryDeploymentDirectory} --exclude .git`, constants_1.workspace);
yield util_1.execute(`rsync -av --progress ${constants_1.action.build}/. ${temporaryDeploymentDirectory} --exclude .git ${constants_1.action.build === '.' && `--exclude ${temporaryDeploymentDirectory}`}`, constants_1.workspace);
// Commits to GitHub.
yield util_1.execute(`git add --all .`, temporaryDeploymentDirectory);
yield util_1.execute(`git switch -c ${temporaryDeploymentBranch}`, temporaryDeploymentDirectory);

View File

@ -8,7 +8,7 @@ export const folder = core.getInput("FOLDER", { required: true });
// Required action data.
export const action = {
build: folder === '.' ? workspace : folder,
build: folder,
gitHubRepository: repository ? repository.full_name : "",
gitHubToken: core.getInput("GITHUB_TOKEN"),
accessToken: core.getInput("ACCESS_TOKEN"),

View File

@ -91,7 +91,7 @@ export async function deploy(): Promise<any> {
force: true
});*/
await execute(`rsync -av --progress ${action.build}/. ${temporaryDeploymentDirectory} --exclude .git`, workspace)
await execute(`rsync -av --progress ${action.build}/. ${temporaryDeploymentDirectory} --exclude .git ${action.build === '.' && `--exclude ${temporaryDeploymentDirectory}`}`, workspace)
// Commits to GitHub.
await execute(`git add --all .`, temporaryDeploymentDirectory);