mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
Failing Build (#124)
This commit is contained in:
parent
4a7ca37984
commit
e1634de1d0
@ -30,7 +30,7 @@ describe("git", () => {
|
||||
});
|
||||
|
||||
const call = await init();
|
||||
expect(execute).toBeCalledTimes(4);
|
||||
expect(execute).toBeCalledTimes(6);
|
||||
expect(call).toBe("Initialization step complete...");
|
||||
});
|
||||
|
||||
@ -46,7 +46,7 @@ describe("git", () => {
|
||||
|
||||
const call = await init();
|
||||
|
||||
expect(execute).toBeCalledTimes(4);
|
||||
expect(execute).toBeCalledTimes(6);
|
||||
expect(call).toBe("Initialization step complete...");
|
||||
});
|
||||
|
||||
@ -109,7 +109,7 @@ describe("git", () => {
|
||||
|
||||
const call = await init();
|
||||
|
||||
expect(execute).toBeCalledTimes(4);
|
||||
expect(execute).toBeCalledTimes(6);
|
||||
expect(call).toBe("Initialization step complete...");
|
||||
});
|
||||
});
|
||||
|
@ -36,6 +36,8 @@ function init() {
|
||||
yield execute_1.execute(`git init`, constants_1.workspace);
|
||||
yield execute_1.execute(`git config user.name ${constants_1.action.name}`, constants_1.workspace);
|
||||
yield execute_1.execute(`git config user.email ${constants_1.action.email}`, constants_1.workspace);
|
||||
yield execute_1.execute(`git remote rm origin`, constants_1.workspace);
|
||||
yield execute_1.execute(`git remote add origin ${constants_1.repositoryPath}`, constants_1.workspace);
|
||||
yield execute_1.execute(`git fetch`, constants_1.workspace);
|
||||
}
|
||||
catch (error) {
|
||||
|
@ -26,6 +26,8 @@ export async function init(): Promise<any> {
|
||||
await execute(`git init`, workspace);
|
||||
await execute(`git config user.name ${action.name}`, workspace);
|
||||
await execute(`git config user.email ${action.email}`, workspace);
|
||||
await execute(`git remote rm origin`, workspace);
|
||||
await execute(`git remote add origin ${repositoryPath}`, workspace);
|
||||
await execute(`git fetch`, workspace);
|
||||
} catch (error) {
|
||||
core.setFailed(`There was an error initializing the repository: ${error}`);
|
||||
|
Loading…
Reference in New Issue
Block a user