Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
PonomareVlad committed Oct 13, 2024
1 parent d28ada1 commit 864e61d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
1 change: 0 additions & 1 deletion .vercelignore

This file was deleted.

9 changes: 9 additions & 0 deletions scripts/build.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {bot, secretToken} from "../src/bot.mjs";
import {getURL} from "vercel-grammy";
import {rm} from "node:fs/promises";

const {VERCEL_ENV} = process.env;

Expand All @@ -15,6 +16,14 @@ await bot.init()
// Exit in case of unsuitable environments
if (!allowedEnvs.includes(VERCEL_ENV)) process.exit();

// Paths to remove at allowed environment
const paths = [
"public/index.html"
];

// Remove necessary paths
await Promise.all(paths.map(path => rm(path))).catch();

// Webhook URL generation
const url = getURL({path: "api/update"});

Expand Down
4 changes: 0 additions & 4 deletions vercel.json

This file was deleted.

0 comments on commit 864e61d

Please sign in to comment.