Skip to content

Commit

Permalink
test: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
itsacoyote committed May 23, 2024
1 parent 880c26b commit 3ee4253
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
workflow_dispatch:

env:
CI: true
HUSKY: 0
NUXT_SITE_ENV: staging # used for NuxtSEO to disable things like indexing on staging

jobs:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
branches: [staging]

env:
CI: true
HUSKY: 0
NUXT_SITE_ENV: staging # used for NuxtSEO to disable things like indexing on staging

jobs:
Expand Down
6 changes: 6 additions & 0 deletions .husky/install.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Skip Husky install in production and CI
if (process.env.NODE_ENV === 'production' || process.env.CI === 'true') {
process.exit(0);
}
const husky = (await import('husky')).default;
console.log(husky());
2 changes: 1 addition & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
extends: [['github:matter-labs/docs-nuxt-template', { install: true }]],
extends: [['github:matter-labs/docs-nuxt-template#add-husky', { install: true }]],
modules: ['@nuxt/content', '@nuxt/ui', '@nuxt/eslint', '@nuxtjs/seo'],
site: {
name: 'zkSync SDK Docs',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"lint:eslint": "eslint .",
"lint:prettier": "prettier --check .",
"fix:prettier": "prettier --write .",
"prepare": "husky",
"prepare": "node .husky/install.mjs",
"postinstall": "nuxt prepare",
"ci:check": "bun run lint:eslint && bun run lint:prettier && bun run lint:spelling && bun run lint:markdown",
"release": "semantic-release"
Expand Down

0 comments on commit 3ee4253

Please sign in to comment.