Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 16 additions & 18 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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/

Expand Down
2 changes: 1 addition & 1 deletion scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}"`);

Expand Down
2 changes: 1 addition & 1 deletion scripts/prepare-dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down
Loading