mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
Unit tests
This commit is contained in:
parent
2b7dae42d4
commit
fefb582571
@ -13,6 +13,7 @@ const { pusher, repository } = github.context.payload;
|
||||
exports.workspace = process.env.GITHUB_WORKSPACE;
|
||||
exports.folder = core.getInput("FOLDER", { required: true });
|
||||
exports.root = ".";
|
||||
exports.isTest = process.env.UNIT_TEST;
|
||||
// Required action data.
|
||||
exports.action = {
|
||||
build: exports.folder,
|
||||
|
@ -103,8 +103,8 @@ function deploy() {
|
||||
});
|
||||
}
|
||||
const hasFilesToCommit = yield util_1.execute(`git status --porcelain`, temporaryDeploymentDirectory);
|
||||
if (!hasFilesToCommit) {
|
||||
console.log('There is nothing to commit. Exiting...');
|
||||
if (!hasFilesToCommit && !constants_1.isTest) {
|
||||
console.log("There is nothing to commit. Exiting...");
|
||||
return Promise.resolve();
|
||||
}
|
||||
// Commits to GitHub.
|
||||
|
Loading…
Reference in New Issue
Block a user