github-pages-deploy-action/src/main.ts

21 lines
469 B
TypeScript
Raw Normal View History

2020-01-20 05:16:28 +08:00
import { setFailed } from "@actions/core";
import { init, deploy } from "./git";
/** Initializes and runs the action. */
2020-02-16 03:15:43 +08:00
export default async function main(): Promise<void> {
try {
await init();
await deploy();
} catch (error) {
2020-01-20 05:16:28 +08:00
/* istanbul ignore next */
console.log("The deployment encountered an error. ❌");
2020-01-20 05:16:28 +08:00
/* istanbul ignore next */
setFailed(error);
} finally {
console.log("Completed Deployment ✅");
}
2020-01-20 05:16:28 +08:00
}
// Init
main();