mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02:00
update matrix
This commit is contained in:
1 parent
84290b1c0e
commit
b52919ebfe
4 files changed
+28
-22
No files matched your search
@@ -36,21 +36,36 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build website
|
name: Build website
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
chunk: [default, api]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v6
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
token: ${{ secrets.GH_TOKEN }}
|
token: ${{ secrets.GH_TOKEN }}
|
||||||
- uses: oven-sh/setup-bun@v2
|
|
||||||
- uses: arduino/setup-protoc@v3
|
- name: Setup bun
|
||||||
|
uses: oven-sh/setup-bun@v2
|
||||||
|
|
||||||
|
- name: Setup protoc
|
||||||
|
uses: arduino/setup-protoc@v3
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ secrets.GH_TOKEN }}
|
repo-token: ${{ secrets.GH_TOKEN }}
|
||||||
- uses: actions/configure-pages@v6
|
|
||||||
- run: bun run setup
|
|
||||||
|
|
||||||
- name: Build website
|
- name: Configure pages
|
||||||
run: bun run build:website
|
uses: actions/configure-pages@v6
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: bun install
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: bun run build
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-pages-artifact@v5
|
uses: actions/upload-pages-artifact@v5
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "cd packages/website && bun run dev",
|
"dev": "cd packages/website && bun run dev",
|
||||||
|
"build": "cd packages/website && bun run build",
|
||||||
"build:averages": "cd packages/scripts && bun run build:averages"
|
"build:averages": "cd packages/scripts && bun run build:averages"
|
||||||
},
|
},
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import node from "@astrojs/node";
|
|
||||||
import react from "@astrojs/react";
|
import react from "@astrojs/react";
|
||||||
import { wrapper } from "@blitzkit/i18n";
|
import { wrapper } from "@blitzkit/i18n";
|
||||||
import locales from "@blitzkit/i18n/locales.json";
|
import locales from "@blitzkit/i18n/locales.json";
|
||||||
@@ -10,14 +9,6 @@ import { defineConfig } from "astro/config";
|
|||||||
import packageJSON from "../../package.json";
|
import packageJSON from "../../package.json";
|
||||||
import { tools } from "./src/constants/tools";
|
import { tools } from "./src/constants/tools";
|
||||||
|
|
||||||
const POSSIBLE_TARGETS = ["app", "web"];
|
|
||||||
|
|
||||||
const target = process.env.PUBLIC_TARGET;
|
|
||||||
|
|
||||||
if (!target || !POSSIBLE_TARGETS.includes(target)) {
|
|
||||||
throw new Error("Invalid target");
|
|
||||||
}
|
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
devToolbar: { enabled: false },
|
devToolbar: { enabled: false },
|
||||||
|
|
||||||
@@ -26,13 +17,12 @@ export default defineConfig({
|
|||||||
esbuild: { target: "es2022" },
|
esbuild: { target: "es2022" },
|
||||||
},
|
},
|
||||||
|
|
||||||
output: target === "web" ? "static" : "server",
|
output: "static",
|
||||||
site: "https://blitzkit.app",
|
site: "https://blitzkit.app",
|
||||||
outDir: "../../dist/website",
|
outDir: "../../dist/website",
|
||||||
prefetch: { defaultStrategy: "hover", prefetchAll: true },
|
prefetch: { defaultStrategy: "hover", prefetchAll: true },
|
||||||
|
|
||||||
build: { concurrency: 4 },
|
build: { concurrency: 4 },
|
||||||
adapter: target === "app" ? node({ mode: "standalone" }) : undefined,
|
|
||||||
|
|
||||||
integrations: [
|
integrations: [
|
||||||
favicons({
|
favicons({
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
"name": "@blitzkit/website",
|
"name": "@blitzkit/website",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "PUBLIC_TARGET=web astro dev",
|
"dev": "astro dev",
|
||||||
"build": "PUBLIC_TARGET=web astro build",
|
"build": "astro build",
|
||||||
"preview": "PUBLIC_TARGET=web astro preview",
|
"preview": "astro preview",
|
||||||
"lint": "PUBLIC_TARGET=web astro check",
|
"lint": "astro check",
|
||||||
"astro": "astro"
|
"astro": "astro"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
Reference in new issue
Block a user