feat: bun build website

This commit is contained in:
TrèsAbhi committed 2024-06-23 20:09:47 -05:00
1 parent 01af4d457a
commit 948a655296
4 files changed
+7 -68

No files matched your search

-37
View File
@@ -1,37 +0,0 @@
name: CI Build Docs
on: push
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use node
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
- name: Install Yarn
run: npm install --location=global yarn
- name: Install dependencies
run: yarn
- name: Build
run: yarn build:docs
- name: Archive build
uses: actions/upload-artifact@v4
with:
name: docs
path: dist/docs
+4 -13
View File
@@ -12,23 +12,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use node
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
- name: Install Yarn
run: npm install --location=global yarn
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- name: Install dependencies
run: yarn
run: bun install
- name: Build
run: yarn build:website
run: bun build:website
- name: Archive build
uses: actions/upload-artifact@v4
+3 -6
View File
@@ -8,12 +8,10 @@
"build:averages": "bun scripts/averages",
"build:db": "prisma generate",
"build:bot": "bun scripts/build.ts --production",
"build:website": "yarn build:db && yarn build:sitemap && next build",
"build:sitemap": "vite-node --script scripts/sitemap",
"build:website": "bun build:db && bun build:sitemap && next build",
"build:sitemap": "bun scripts/sitemap.ts",
"build:docs": "vitepress build docs",
"build:ratingleaderboard": "vite-node --script scripts/buildRatingLeaderboard",
"test": "vite-node --script scripts/test",
"test2": "vite-node --script scripts/test2",
"build:ratingleaderboard": "bun --script scripts/buildRatingLeaderboard.ts",
"dev:bot": "vite-node --script scripts/build && yarn start:bot",
"dev:docs": "vitepress dev docs",
"dev:website": "next dev",
@@ -23,7 +21,6 @@
"lint": "npx tsc",
"lint:website": "next lint",
"format": "prettier --write \"**/*.@(json|js|jsx|css|md|ts|tsx|html|xml|yml|gltf)\"",
"lint:version": "vite-node --script scripts/checkVersionMissMatch",
"knip": "knip",
"update": "yarn upgrade --latest",
"tunnel": "cloudflared tunnel --url http://localhost:3000",
-12
View File
@@ -1,12 +0,0 @@
import { readdir } from 'fs/promises';
import packageJSON from '../package.json';
const { version } = packageJSON;
const changelogs = await readdir('docs/changelogs');
const hasVersion = changelogs.includes(`${version}.md`);
if (hasVersion) {
console.log(`Version ${version} found in changelogs`);
} else {
throw new Error(`Version ${version} not found in changelogs`);
}