Add a 10 second wait to give gitlab time to update the link
This commit is contained in:
parent
df877107a3
commit
a76aba62f2
7
index.ts
7
index.ts
|
@ -14,7 +14,7 @@ const base64 = Buffer.from(
|
|||
|
||||
app.use(Express.static(__dirname + "/out"));
|
||||
|
||||
app.post("/", (req, res) => {
|
||||
app.post("/", async (req, res) => {
|
||||
const header = req.header("authorization");
|
||||
|
||||
if (header == null) {
|
||||
|
@ -39,6 +39,7 @@ app.post("/", (req, res) => {
|
|||
return;
|
||||
}
|
||||
|
||||
await sleep(10);
|
||||
updateWebsite();
|
||||
|
||||
res.send("Done!");
|
||||
|
@ -58,3 +59,7 @@ function updateWebsite() {
|
|||
execSync(`wget -O ${zipPath} '${url}'`);
|
||||
execSync(`yes All | unzip ${zipPath}`);
|
||||
}
|
||||
|
||||
function sleep(seconds: number) {
|
||||
return new Promise((resolve) => setTimeout(resolve, seconds * 1000));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue