diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index a41c7b1..effd56a 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -10,6 +10,9 @@ permissions: contents: write pull-requests: write +env: + HUSKY: 0 + jobs: release-please: runs-on: ubuntu-latest diff --git a/.husky/install.mjs b/.husky/install.mjs new file mode 100644 index 0000000..a4d9aac --- /dev/null +++ b/.husky/install.mjs @@ -0,0 +1,8 @@ +// Skip Husky install in production and CI +// https://typicode.github.io/husky/how-to.html#ci-server-and-docker +if (process.env.NODE_ENV === "production" || process.env.CI === "true") { + console.log("Skipping Husky install because of production environment."); + process.exit(0); +} +const husky = (await import("husky")).default; +console.log(husky()); diff --git a/bun.lockb b/bun.lockb index c4a43a1..6aa5b9e 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 389b320..6078afb 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "format:lint": "eslint --fix .", "format:prettier": "prettier --write .", "format:cspell": "cspell **/*", - "prepare": "husky install", + "prepare": "node .husky/install.mjs", "deploy-dev": "wrangler deploy --env dev", "deploy-production": "wrangler deploy --env production", "worker": "wrangler dev --env dev --port 8787",