mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
w
This commit is contained in:
parent
5f7fb1eb2e
commit
0c68fff403
@ -28,9 +28,11 @@ function init() {
|
|||||||
if (!constants_1.action.accessToken && !constants_1.action.gitHubToken) {
|
if (!constants_1.action.accessToken && !constants_1.action.gitHubToken) {
|
||||||
return core.setFailed("You must provide the action with either a Personal Access Token or the GitHub Token secret in order to deploy.");
|
return core.setFailed("You must provide the action with either a Personal Access Token or the GitHub Token secret in order to deploy.");
|
||||||
}
|
}
|
||||||
if (constants_1.action.build.startsWith("/") || constants_1.action.build.startsWith("./")) {
|
/*if (action.build.startsWith("/") || action.build.startsWith("./")) {
|
||||||
return core.setFailed(`The deployment folder cannot be prefixed with '/' or './'. Instead reference the folder name directly.`);
|
return core.setFailed(
|
||||||
}
|
`The deployment folder cannot be prefixed with '/' or './'. Instead reference the folder name directly.`
|
||||||
|
);
|
||||||
|
}*/
|
||||||
yield util_1.execute(`git init`, constants_1.action.build);
|
yield util_1.execute(`git init`, constants_1.action.build);
|
||||||
yield util_1.execute(`git config user.name ${constants_1.action.pusher.name}`, constants_1.action.build);
|
yield util_1.execute(`git config user.name ${constants_1.action.pusher.name}`, constants_1.action.build);
|
||||||
yield util_1.execute(`git config user.email ${constants_1.action.pusher.email}`, constants_1.action.build);
|
yield util_1.execute(`git config user.email ${constants_1.action.pusher.email}`, constants_1.action.build);
|
||||||
|
@ -14,11 +14,11 @@ export async function init(): Promise<any> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (action.build.startsWith("/") || action.build.startsWith("./")) {
|
/*if (action.build.startsWith("/") || action.build.startsWith("./")) {
|
||||||
return core.setFailed(
|
return core.setFailed(
|
||||||
`The deployment folder cannot be prefixed with '/' or './'. Instead reference the folder name directly.`
|
`The deployment folder cannot be prefixed with '/' or './'. Instead reference the folder name directly.`
|
||||||
);
|
);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
await execute(`git init`, action.build);
|
await execute(`git init`, action.build);
|
||||||
await execute(`git config user.name ${action.pusher.name}`, action.build);
|
await execute(`git config user.name ${action.pusher.name}`, action.build);
|
||||||
|
Loading…
Reference in New Issue
Block a user