diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 62940f9..22c79d6 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -28,10 +28,13 @@ jobs: sparse-checkout: | .eleventy.js package.json - pnpm-lock.yaml + bun.lock + bunfig.toml flake.nix flake.lock bin + scripts + packages src - name: Copy template files to combined dir @@ -86,31 +89,26 @@ jobs: name: combined-files path: combined - - name: Setup pnpm - uses: pnpm/action-setup@v4 + - name: Setup Bun + uses: oven-sh/setup-bun@v2 with: - version: latest + bun-version: latest - - name: Setup Node.js - uses: actions/setup-node@v6 - with: - node-version: latest - cache: 'pnpm' - cache-dependency-path: combined/pnpm-lock.yaml - - - name: Restore image cache + - name: Restore cache uses: actions/cache@v4 with: - path: combined/.image-cache - key: ${{ runner.os }}-images-${{ hashFiles('combined/src/images/**/*') }} + path: | + combined/node_modules + combined/.image-cache + key: ${{ runner.os }}-bun-${{ hashFiles('combined/bun.lock') }} restore-keys: | - ${{ runner.os }}-images- + ${{ runner.os }}-bun- - - name: Build with Node + - name: Build with Bun run: | cd combined - pnpm install --frozen-lockfile - pnpm exec eleventy + bun install --frozen-lockfile + bun scripts/eleventy-build.js mkdir -p ../_site mv _site/* ../_site/ diff --git a/scripts/build.js b/scripts/build.js index f913534..bced08b 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -13,7 +13,7 @@ console.log('Building site...'); fs.rmSync(output, { recursive: true, force: true }); -execSync('pnpm exec eleventy', { cwd: dev, stdio: 'inherit' }); +execSync('bun run build', { cwd: dev, stdio: 'inherit' }); execSync(`mv "${path.join(dev, '_site')}" "${output}"`); diff --git a/scripts/prepare-dev.js b/scripts/prepare-dev.js index a5a8914..9e4a05d 100644 --- a/scripts/prepare-dev.js +++ b/scripts/prepare-dev.js @@ -53,7 +53,7 @@ function prep() { if (!fs.existsSync(path.join(dev, "node_modules"))) { console.log("Installing dependencies..."); - execSync("pnpm install", { cwd: dev }); + execSync("bun install", { cwd: dev }); } fs.rmSync(path.join(dev, "_site"), { recursive: true, force: true });