Skip to content

Commit 14becff

Browse files
Roger-luoclaude
andcommitted
ci(website): host docs on AWS Amplify; drop gh-pages PR previews
Add amplify.yml (repo-root buildspec) reproducing the generate->build half of website-deploy.yml: uv sync + Rust nightly + notebook execution, then `pnpm --dir website build`, artifacts at website/dist. Served at the domain root so SITE_BASE is "/" (no gh-pages subpath juggling). Delete website-preview.yml: PR previews now come from Amplify, and pushing each PR's built site into gh-pages was bloating the repo history. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent cfc753b commit 14becff

4 files changed

Lines changed: 94 additions & 220 deletions

File tree

.github/workflows/website-preview.yml

Lines changed: 0 additions & 206 deletions
This file was deleted.

amplify.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# AWS Amplify Hosting build spec for the Bloqade Astro/Starlight docs site.
2+
#
3+
# WHY THIS LIVES AT THE REPO ROOT (not website/): the site build is NOT
4+
# self-contained under website/. It runs `uv sync` against the root pyproject,
5+
# reads docs/digital/** for the tutorial emitter, and clones the API source
6+
# tags with the root-installed `bloqade-*` packages. So Amplify must build from
7+
# the repo root — do NOT configure a monorepo `appRoot` in the console; leave
8+
# the app root at "/" so this file is used verbatim. Artifacts are then pointed
9+
# at website/dist below.
10+
#
11+
# This mirrors the generate->build half of .github/workflows/website-deploy.yml.
12+
# It deliberately OMITS the CI gates (vitest, link/xref checks, Playwright
13+
# runtime crawl) — those stay in GitHub Actions on PRs. Amplify only needs to
14+
# produce the servable dist/.
15+
#
16+
# Because Amplify serves both production and PR previews at a domain ROOT (never
17+
# a gh-pages subpath), SITE_BASE is "/" here — all the gh-pages `/next/` and
18+
# `/astro-preview/pr-N/` base juggling simply disappears.
19+
version: 1
20+
env:
21+
variables:
22+
# Pins mirror the GitHub Actions workflow so builds are reproducible.
23+
NODE_VERSION: "24"
24+
PNPM_VERSION: "11"
25+
UV_VERSION: "0.5.1"
26+
RUST_TOOLCHAIN: "nightly-2026-04-17" # rustdoc JSON format_version 57
27+
# Served at the domain root on Amplify — no subpath. Override SITE_URL
28+
# per-branch in the Amplify console if you want correct canonical/sitemap
29+
# URLs on the production branch (e.g. https://bloqade.quera.com).
30+
SITE_BASE: "/"
31+
SITE_URL: "https://bloqade.quera.com"
32+
# WIP-parity: warn (don't fail the deploy) on unresolved <ApiXref>. Flip to
33+
# "1" once the API content is stable if you want strict previews.
34+
XREF_STRICT: "0"
35+
EXECUTE_NOTEBOOKS: "1" # execute tutorials (cache-first; failures degrade to static)
36+
frontend:
37+
phases:
38+
preBuild:
39+
commands:
40+
# --- Node 24 + pnpm 11 (corepack ships with Node 24) --------------
41+
- nvm install "$NODE_VERSION"
42+
- nvm use "$NODE_VERSION"
43+
- corepack enable
44+
- corepack prepare "pnpm@$PNPM_VERSION" --activate
45+
# --- uv (Python) — installs to ~/.local/bin --------------------------
46+
- curl -LsSf "https://astral.sh/uv/${UV_VERSION}/install.sh" | sh
47+
- export PATH="$HOME/.local/bin:$PATH"
48+
# Install bloqade into the root env so resolve_sources.py can pin each
49+
# API source tag via `uv pip show bloqade-*`.
50+
- uv sync
51+
# --- Rust nightly for rustdoc JSON ----------------------------------
52+
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain none
53+
- export PATH="$HOME/.cargo/bin:$PATH"
54+
- rustup toolchain install "$RUST_TOOLCHAIN" --profile minimal
55+
# --- website JS deps ------------------------------------------------
56+
- pnpm --dir website install --frozen-lockfile
57+
build:
58+
commands:
59+
# Re-establish PATH for the build phase (Amplify may start a fresh shell
60+
# per phase; harmless if it persists).
61+
- export PATH="$HOME/.local/bin:$HOME/.cargo/bin:$PATH"
62+
- nvm use "$NODE_VERSION"
63+
# Generate src/content/docs/api/dev/** (python + rust) + inventories +
64+
# versions.json.
65+
- >
66+
uv run python website/scripts/build_versions.py
67+
--versions dev
68+
--clone-dir website/sources
69+
--rust-toolchain "$RUST_TOOLCHAIN"
70+
# Generate guides/tutorials/** from docs/digital/** (cache-first: a warm
71+
# .notebook-cache => zero kernel executions).
72+
- uv run --project website/emitters/notebooks bloqade-docs-build-notebooks
73+
# Build the static site -> website/dist.
74+
- pnpm --dir website build
75+
artifacts:
76+
baseDirectory: website/dist
77+
files:
78+
- "**/*"
79+
cache:
80+
paths:
81+
# JS + Astro incremental content
82+
- website/node_modules/**/*
83+
- website/.astro/**/*
84+
# Content-addressed executed-notebook cache (the emitter fingerprints each
85+
# notebook internally; caching the dir gives the warm-cache fast path).
86+
- website/emitters/notebooks/.notebook-cache/**/*
87+
# Python / uv
88+
- .venv/**/*
89+
- website/emitters/notebooks/.venv/**/*
90+
- $HOME/.cache/uv/**/*
91+
# Rust toolchain + compiled crate cache (large; avoids re-download/rebuild)
92+
- $HOME/.rustup/**/*
93+
- $HOME/.cargo/registry/**/*
94+
- $HOME/.cargo/git/**/*

website/src/content/docs/guides/digital/index.mdx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,6 @@ title: Bloqade Digital
33
description: The digital submodule of Bloqade (bloqade-circuit) — eDSLs for building digital quantum programs.
44
---
55

6-
import { Aside } from '@astrojs/starlight/components';
7-
8-
<Aside type="caution" title="Note">
9-
This page is under construction. The content may be incomplete or incorrect. Submit an issue
10-
on [GitHub](https://github.com/QuEraComputing/bloqade/issues/new) if you need help or want to
11-
contribute.
12-
</Aside>
13-
146
The digital submodule of Bloqade, called `bloqade-circuit`, defines a set of embedded domain-specific languages (eDSLs) that can be used to define digital quantum programs.
157
These programs are intended for both simulation and to be run on hardware. This package is open source and can be found [on GitHub](https://github.com/QuEraComputing/bloqade-circuit).
168

website/src/content/docs/guides/getting-started/quickstart-analog.mdx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@ sidebar:
88

99
import { Aside } from '@astrojs/starlight/components';
1010

11-
<Aside type="caution">
12-
This page is under construction. The content may be incomplete or incorrect. Submit an issue
13-
on [GitHub](https://github.com/QuEraComputing/bloqade/issues/new) if you need help or want to
14-
contribute.
15-
</Aside>
16-
1711
All the sections below are self-contained, you can click on the links in the Table of Contents to read the relevant parts.
1812

1913
## Defining Atom Geometry

0 commit comments

Comments
 (0)