diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index b8c16b90..7e817211 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -1,6 +1,9 @@ name: Deploy on gh-pages -on: workflow_dispatch +on: + push: + branches: + - main jobs: deploy: @@ -18,12 +21,8 @@ jobs: - run: bun install --frozen-lockfile - # builds the sdk - run: bun run build - # builds the docs - - run: cd docs && bun install --frozen-lockfile && bun run build - - name: deploy uses: peaceiris/actions-gh-pages@v3 with: diff --git a/package.json b/package.json index 0b3244ca..21dbcf4e 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "test:only": "bun --env-file=.env test --watch --only", "test:coverage": "bun --env-file=.env test --coverage", "dev": "tsc -w", - "build": "tsc --project src/tsconfig.build.json --module es2020", + "build": "bun run sdk:build && bun run docs:build", "lint": "biome lint --apply .", "format": "biome format --write .", "check": "biome check --apply .", @@ -17,6 +17,7 @@ "docs:dev": "cd docs && bun run dev", "docs:build": "cd docs && bun run build", "docs:preview": "cd docs && bun run preview", + "sdk:build": "tsc --project src/tsconfig.build.json --module es2020", "link": "cd src && bun link" }, "devDependencies": { @@ -27,7 +28,8 @@ "@greymass/abi2core": "^2.0.1", "@size-limit/preset-big-lib": "^11.1.2", "@types/bun": "^1.1.1", - "typescript": "5.4.2" + "typescript": "5.4.2", + "vite": "^5.0.7" }, "trustedDependencies": ["@biomejs/biome"], "dependencies": {