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
22 changes: 10 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ jobs:
image: mcr.microsoft.com/playwright:v1.59.1-noble
options: --ipc=host
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- name: Restore npm cache
uses: actions/cache@v4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ~/.npm
key: npm-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
npm-${{ runner.os }}-

- name: Set up Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version-file: .nvmrc

Expand All @@ -41,11 +41,6 @@ jobs:
apt-get update
apt-get install -y unzip

- name: Set up Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x

- name: Install dependencies
shell: bash
run: npm ci
Expand All @@ -57,16 +52,19 @@ jobs:
test -f README.md
test -f package.json
test -f package-lock.json
test -f deno.json
git diff --check
test -f wrangler.toml

- name: Fetch book sources
shell: bash
run: deno task fetch:book-repositories
run: npm run fetch:book-repositories

- name: Build site
shell: bash
run: deno task build
run: npm run build

- name: Validate Worker bundle
shell: bash
run: npm run worker:dry-run

- name: Run Lighthouse
shell: bash
Expand Down
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
save-exact=true
engine-strict=true
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20.13.1
v24.11.0
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,30 @@ IMAGES_ROOT=TODO
Bootstrap the project:

```bash
deno task bootstrap
npm run bootstrap
```

Start the development server:

```bash
deno task start
npm run start
```

Now you can go to [http://localhost:3000](http://localhost:3000).
Now you can open the local Wrangler URL.

## Building

Build using the following command:

```bash
deno task build
npm run build
```

Deploy `./build`.
Validate the Cloudflare Worker bundle:

```bash
npm run worker:dry-run
```

## PageSpeed debugging

Expand Down
10 changes: 3 additions & 7 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

set -e # Exit with nonzero exit code if anything fails

curl -fsSL https://deno.land/x/install/install.sh | sh -s v1.43.3

export DENO_INSTALL="/opt/buildhome/.deno"
export PATH="$DENO_INSTALL/bin:$PATH"

deno task bootstrap
deno task build
npm install
npm run bootstrap
npm run build
15 changes: 0 additions & 15 deletions deno.json

This file was deleted.

75 changes: 0 additions & 75 deletions deno.lock

This file was deleted.

6 changes: 6 additions & 0 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ Build the site, start a local static server, and audit the homepage:
npm run lighthouse:local
```

Validate the Cloudflare Worker bundle:

```bash
npm run worker:dry-run
```

Audit an already-running URL:

```bash
Expand Down
Loading
Loading