Skip to content
Open
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
14 changes: 9 additions & 5 deletions .github/workflows/lighthouse-monitor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,23 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Deno
uses: denoland/setup-deno@v1
- name: Setup Node.js
uses: actions/setup-node@v4
with:
deno-version: v2.x
node-version-file: .nvmrc
cache: npm

- name: Install dependencies
run: npm ci

- name: Build site
env:
API_URL: ${{ secrets.API_URL }}
API_TOKEN: ${{ secrets.API_TOKEN }}
run: deno task build
run: npm run build

- name: Optimize build
run: deno task optimize:build
run: npm run optimize:build

- name: Run Lighthouse CI
uses: treosh/lighthouse-ci-action@v12
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,23 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Deno
uses: denoland/setup-deno@v1
- name: Setup Node.js
uses: actions/setup-node@v4
with:
deno-version: v2.x
node-version-file: .nvmrc
cache: npm

- name: Install dependencies
run: npm ci

- name: Build site
env:
API_URL: ${{ secrets.API_URL }}
API_TOKEN: ${{ secrets.API_TOKEN }}
run: deno task build
run: npm run build

- name: Optimize build
run: deno task optimize:build
run: npm run optimize:build

- name: Run Lighthouse CI
uses: treosh/lighthouse-ci-action@v12
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ build/
node_modules/
.jampack
.lighthouseci/

.gustwind/
32 changes: 17 additions & 15 deletions LIGHTHOUSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,18 @@ The audit configuration is in [`lighthouserc.json`](./lighthouserc.json):
# Install Node.js if not already installed
# macOS with Homebrew
brew install node
npm install
```

### Run Lighthouse Locally

```bash
# Build the site
deno task build
deno task optimize:build
npm run build
npm run optimize:build

# Serve the built site in the background
deno task serve &
npm run serve &
SERVER_PID=$!

# Install Lighthouse CI globally
Expand All @@ -67,11 +68,11 @@ Create `scripts/run-lighthouse.sh`:
set -e

echo "Building site..."
deno task build
deno task optimize:build
npm run build
npm run optimize:build

echo "Starting server..."
deno task serve &
npm run serve &
SERVER_PID=$!

# Wait for server to start
Expand Down Expand Up @@ -127,13 +128,14 @@ Common improvements:

The GitHub Actions workflow:
1. Checks out the code
2. Sets up Deno v2
3. Builds the site with `deno task build`
4. Optimizes with Jampack (`deno task optimize:build`)
5. Runs Lighthouse audits
6. Comments on PRs with results (if applicable)
7. Uploads artifacts for 30 days
8. Fails the build if thresholds not met
2. Sets up Node.js 24
3. Installs dependencies with `npm ci`
4. Builds the site with `npm run build`
5. Optimizes with Jampack (`npm run optimize:build`)
6. Runs Lighthouse audits
7. Comments on PRs with results (if applicable)
8. Uploads artifacts for 30 days
9. Fails the build if thresholds not met

## Troubleshooting

Expand All @@ -142,11 +144,11 @@ The GitHub Actions workflow:
- Verify `.lighthouseci/results/` directory is created

**Workflow fails to build?**
- Ensure `deno.json` tasks are correct
- Ensure `package.json` scripts are correct
- Check that the build succeeds locally first

**Port 3000 already in use?**
- Change the port in `lighthouserc.json` URLs and `deno.json` serve task
- Change the port in `lighthouserc.json` URLs and the `serve` script in `package.json`

## References

Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@ This is the website of Future Frontend conference.

## Development

Before running the commands, copy `.env.template` as `.env` and fill the fields.
If you need API-backed data locally, copy `.env.template` as `.env` and fill the fields. The file is optional, so CI and builds without API credentials still run.

* Development server - `deno task start`
* Build process - `deno task build`
* Install dependencies - `npm install`
* Development server - `npm run start`
* Build process - `npm run build`

## Template

**Main features:**

* Markdown processing - the project README you see here is processed through the system
* Support for [Twind](https://twind.dev/) - Twind is a Tailwind-compatible styling approach
* Support for [Tailwind CSS](https://tailwindcss.com/) through Gustwind's packaged Tailwind plugin
* State management through [Sidewind](https://sidewind.js.org/) - Sidewind has been configured as a script to the project so you can use it to add state to your components
* Basic components - I.e., `BaseLayout`, `SiteLink`, etc.

Expand Down
6 changes: 3 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
set -e

export FONTCONFIG_PATH=${PWD}/assets/fonts
curl -fsSL https://deno.land/x/install/install.sh | sh -s v2.7.7
/opt/buildhome/.deno/bin/deno task build
/opt/buildhome/.deno/bin/deno task optimize:build
npm ci
npm run build
npm run optimize:build
12 changes: 0 additions & 12 deletions deno.json

This file was deleted.

Loading
Loading