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
63 changes: 63 additions & 0 deletions .github/workflows/web-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Deploy static sites

on:
push:
branches: [develop]
paths:
- 'web/**'
- '.github/workflows/web-deploy.yml'
pull_request:
branches: [develop]
paths:
- 'web/**'
- '.github/workflows/web-deploy.yml'

jobs:
deploy:
name: Deploy ${{ matrix.site }}
runs-on: ubuntu-latest
concurrency:
group: web-deploy-${{ matrix.site }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
deployments: write
pull-requests: write
strategy:
fail-fast: false
matrix:
site: [landing, blog, guides, api]

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 10.23.0

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
cache-dependency-path: web/pnpm-lock.yaml

- name: Install dependencies
working-directory: web
run: pnpm install --frozen-lockfile

- name: Build ${{ matrix.site }}
working-directory: web
run: pnpm --filter @wheels-dev/site-${{ matrix.site }} build

- name: Deploy to Cloudflare Pages
uses: cloudflare/wrangler-action@v3
env:
# Untrusted inputs — pass via env to prevent command injection
DEPLOY_BRANCH: ${{ github.head_ref || github.ref_name }}
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy web/sites/${{ matrix.site }}/dist --project-name=wheels-${{ matrix.site }} --branch="$DEPLOY_BRANCH" --commit-hash="$GITHUB_SHA"
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,12 @@ tests/_output/
/playwright-report/
/blob-report/
/playwright/.cache/
/playwright/.auth/
/playwright/.auth/

# Node / Astro (web/)
web/**/node_modules/
web/**/.astro/
web/**/dist/
web/**/.wrangler/
web/**/.turbo/
web/.pnpm-store/
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22
10 changes: 9 additions & 1 deletion commitlint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,15 @@ export default {
'plugin',
'sse',
'seed',
'docs'
'docs',
// Static-site monorepo under web/ (wheels.dev sites)
'web',
'web/ui',
'web/landing',
'web/blog',
'web/guides',
'web/api',
'web/starlight'
]
],
// Allow empty scope (scope is optional)
Expand Down
9 changes: 9 additions & 0 deletions web/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Generated output — never format
**/dist/
**/.astro/
**/node_modules/
**/pnpm-lock.yaml
**/pagefind/

# Lockfiles and binaries
*.svg
8 changes: 8 additions & 0 deletions web/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"printWidth": 100,
"singleQuote": true,
"semi": true,
"trailingComma": "es5",
"plugins": ["prettier-plugin-astro"],
"overrides": [{ "files": "*.astro", "options": { "parser": "astro" } }]
}
30 changes: 30 additions & 0 deletions web/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# wheels.dev Static Sites

Monorepo for the four static sites served under the `wheels.dev` apex and subdomains:

| Site | Path | Domain |
| ------- | ---------------- | ------------------- |
| Landing | `sites/landing/` | `wheels.dev` |
| Guides | `sites/guides/` | `guides.wheels.dev` |
| API | `sites/api/` | `api.wheels.dev` |
| Blog | `sites/blog/` | `blog.wheels.dev` |

Shared UI lives in `packages/ui/` (imported as `@wheels-dev/ui`).

## Local development

```bash
pnpm install
pnpm dev:blog # or dev:landing, dev:guides, dev:api
```

## Build

```bash
pnpm build # builds all four sites
```

## Deploy

Cloudflare Pages watches this repo and builds each site when files under its
path change. See the project dashboard for per-site build settings.
24 changes: 24 additions & 0 deletions web/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "@wheels-dev/web",
"version": "0.0.0",
"private": true,
"description": "wheels.dev static sites monorepo",
"packageManager": "pnpm@10.23.0",
"engines": {
"node": ">=22.0.0"
},
"scripts": {
"build": "pnpm -r --filter './sites/*' build",
"dev:landing": "pnpm --filter @wheels-dev/site-landing dev",
"dev:blog": "pnpm --filter @wheels-dev/site-blog dev",
"dev:guides": "pnpm --filter @wheels-dev/site-guides dev",
"dev:api": "pnpm --filter @wheels-dev/site-api dev",
"format": "prettier --write \"**/*.{astro,ts,tsx,md,json,css}\"",
"format:check": "prettier --check \"**/*.{astro,ts,tsx,md,json,css}\""
},
"devDependencies": {
"prettier": "^3.4.2",
"prettier-plugin-astro": "^0.14.1",
"typescript": "^5.7.2"
}
}
14 changes: 14 additions & 0 deletions web/packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "@wheels-dev/ui",
"version": "0.0.0",
"type": "module",
"private": true,
"exports": {
"./components/Header.astro": "./src/components/Header.astro",
"./components/Footer.astro": "./src/components/Footer.astro",
"./styles/tokens.css": "./src/styles/tokens.css"
},
"peerDependencies": {
"astro": "^5.0.0"
}
}
45 changes: 45 additions & 0 deletions web/packages/ui/src/components/Footer.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
const year = new Date().getFullYear();
---

<footer class="wd-footer">
<div class="wd-footer__inner">
<p>&copy; {year} Wheels contributors. MIT licensed.</p>
<nav class="wd-footer__nav">
<a href="https://github.com/wheels-dev/wheels">GitHub</a>
<a href="https://guides.wheels.dev/">Guides</a>
<a href="https://api.wheels.dev/">API</a>
</nav>
</div>
</footer>

<style>
.wd-footer {
border-top: 1px solid var(--color-border);
padding: 2rem 1.5rem;
background: var(--color-bg);
color: var(--color-muted);
font-family: var(--font-sans);
font-size: 0.875rem;
}
.wd-footer__inner {
max-width: var(--max-width);
margin: 0 auto;
display: flex;
justify-content: space-between;
align-items: center;
gap: 1rem;
flex-wrap: wrap;
}
.wd-footer__nav {
display: flex;
gap: 1rem;
}
.wd-footer__nav a {
color: var(--color-muted);
text-decoration: none;
}
.wd-footer__nav a:hover {
color: var(--color-fg);
}
</style>
56 changes: 56 additions & 0 deletions web/packages/ui/src/components/Header.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
interface Props {
current?: 'landing' | 'guides' | 'api' | 'blog';
}
const { current } = Astro.props;
const links = [
{ label: 'Home', href: 'https://wheels.dev/', key: 'landing' },
{ label: 'Guides', href: 'https://guides.wheels.dev/', key: 'guides' },
{ label: 'API', href: 'https://api.wheels.dev/', key: 'api' },
{ label: 'Blog', href: 'https://blog.wheels.dev/', key: 'blog' },
];
---

<header class="wd-header">
<a class="wd-header__brand" href="https://wheels.dev/">Wheels</a>
<nav class="wd-header__nav">
{
links.map((l) => (
<a href={l.href} class:list={['wd-header__link', { 'is-current': current === l.key }]}>
{l.label}
</a>
))
}
</nav>
</header>

<style>
.wd-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 1rem 1.5rem;
border-bottom: 1px solid var(--color-border);
background: var(--color-bg);
font-family: var(--font-sans);
}
.wd-header__brand {
font-weight: 700;
font-size: 1.25rem;
color: var(--color-fg);
text-decoration: none;
}
.wd-header__nav {
display: flex;
gap: 1.5rem;
}
.wd-header__link {
color: var(--color-muted);
text-decoration: none;
font-size: 0.95rem;
}
.wd-header__link:hover,
.wd-header__link.is-current {
color: var(--color-fg);
}
</style>
20 changes: 20 additions & 0 deletions web/packages/ui/src/styles/tokens.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
:root {
--color-bg: #ffffff;
--color-fg: #1a1a1a;
--color-muted: #6b7280;
--color-accent: #e63946;
--color-border: #e5e7eb;
--font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
--font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
--max-width: 1200px;
--radius: 0.375rem;
}

@media (prefers-color-scheme: dark) {
:root {
--color-bg: #0f0f0f;
--color-fg: #f5f5f5;
--color-muted: #9ca3af;
--color-border: #262626;
}
}
4 changes: 4 additions & 0 deletions web/packages/ui/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "../../tsconfig.base.json",
"include": ["src/**/*"]
}
Loading
Loading