Skip to content

Commit 087d867

Browse files
committed
Merge branch 'main' into feat/roadmap-page
2 parents a30cf31 + fc7b36a commit 087d867

16 files changed

Lines changed: 553 additions & 1593 deletions

.github/copilot-instructions.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,14 @@ This is the Interledger Developers Portal, a documentation site built with [Astr
2222
- **Important**: Build output is copied to `_netlify/builders/developers/` to serve at `/developers/` path
2323
- Redirect rules route `/developers/*` to `/developers/index.html` for client-side routing
2424

25-
### Production (Google Cloud)
26-
- Deployed to `https://interledger.org/developers/` via Google Cloud Storage
27-
- Triggered automatically on merge to `main` by `.github/workflows/deploy_gcs.yml`
28-
- Process: Build → Deploy to GCS → Rebuild nginx-rewrite Cloud Run service → Invalidate CDN
29-
- **Legacy**: `deploy.yml` exists but is deprecated - use `deploy_gcs.yml`
25+
### Production (Netlify, fronted by GCP)
26+
- Built and hosted by Netlify at `https://interledger-org-developers.netlify.app/developers/`
27+
- Users reach it at `https://interledger.org/developers/` via the GCP load balancer, which proxies `/developers/*` through a Cloud Run nginx service (`nginx-rewrite`) to Netlify
28+
- The address bar stays on `interledger.org` — it is **not** a redirect
29+
- GCP Cloud CDN sits in front of the proxy (default TTL 1 hour)
30+
- **After a content deploy**, if you need changes live immediately, manually run the **Invalidate CDN** workflow in the Actions tab
31+
- The `Deploy nginx proxy to Cloud Run` workflow (`.github/workflows/deploy_gcs.yml`) only rebuilds the proxy container and triggers on changes under `ci/nginx-rewrite/**`
32+
- The nginx config itself lives in `ci/nginx-rewrite/` (Dockerfile + nginx.conf)
3033

3134
## Key Development Notes
3235

.github/workflows/deploy_gcs.yml

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,21 @@
1-
name: Deploy to GCS
1+
name: Deploy nginx proxy to Cloud Run
22

33
on:
4-
# Trigger the workflow every time you push to the `main` branch
5-
# Using a different branch name? Replace `main` with your branch's name
64
push:
75
branches: [main]
8-
# Allows you to run this workflow manually from the Actions tab on GitHub.
6+
paths:
7+
- 'ci/nginx-rewrite/**'
98
workflow_dispatch:
109

11-
# Allow this job to clone the repo and create a page deployment
1210
permissions:
1311
contents: read
14-
pages: write
15-
id-token: write
1612

1713
jobs:
1814
deploy:
1915
runs-on: ubuntu-latest
2016
steps:
2117
- name: Checkout your repository using git
22-
uses: actions/checkout@v3
23-
- uses: actions/setup-node@v3
24-
with:
25-
node-version: 18
18+
uses: actions/checkout@v4
2619

2720
- name: Authenticate to Google Cloud
2821
uses: google-github-actions/auth@v2
@@ -32,15 +25,6 @@ jobs:
3225
- name: Set up Cloud SDK
3326
uses: google-github-actions/setup-gcloud@v2
3427

35-
- uses: oven-sh/setup-bun@v1
36-
- name: Install dependencies
37-
run: bun install
38-
- name: Test build website
39-
run: bun run build
40-
41-
- name: Deploy to GCS
42-
run: gsutil -m rsync -r -d ./dist/ gs://${{ secrets.GCS_BUCKET }}/developers
43-
4428
- name: Build nginx container
4529
run: |
4630
cd ci/nginx-rewrite
@@ -59,9 +43,3 @@ jobs:
5943
--min-instances 0 \
6044
--max-instances 10 \
6145
--quiet
62-
63-
- name: Invalidate CDN cache
64-
run: |
65-
gcloud compute url-maps invalidate-cdn-cache interledger-org \
66-
--path "/developers/*" \
67-
--async
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Invalidate CDN
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
invalidate:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Authenticate to Google Cloud
14+
uses: google-github-actions/auth@v2
15+
with:
16+
credentials_json: ${{ secrets.GSA_JSON }}
17+
18+
- name: Set up Cloud SDK
19+
uses: google-github-actions/setup-gcloud@v2
20+
21+
- name: Invalidate CDN cache for /developers/*
22+
run: |
23+
gcloud compute url-maps invalidate-cdn-cache interledger-org \
24+
--path "/developers/*" \
25+
--async

.github/workflows/test-build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout your repository using git
19-
uses: actions/checkout@v3
20-
- uses: actions/setup-node@v3
19+
uses: actions/checkout@v4
20+
- uses: actions/setup-node@v4
2121
with:
22-
node-version: 18
22+
node-version: 22
2323

2424
- uses: oven-sh/setup-bun@v1
2525
- name: Install dependencies

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
lts/iron
1+
22

README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,18 +81,21 @@ This project has two deployment mechanisms:
8181

8282
Every pull request automatically generates a preview deployment on Netlify at `https://deploy-preview-{PR_NUMBER}--developers-preview.netlify.app/developers/`. This allows reviewers to see changes before they're merged. The Netlify configuration is defined in `netlify.toml`.
8383

84-
### Production Deployments (Google Cloud Storage)
84+
### Production Deployments (Netlify + GCP proxy)
8585

86-
The real production deployment is served through Google Cloud Storage (GCS) at `https://interledger.org/developers/` as part of the main Interledger website. This is a transparent proxy configuration - the developers portal is hosted separately but appears as part of the main domain.
86+
The production site is built and hosted on Netlify, but users access it at `https://interledger.org/developers/` via the main Interledger load balancer. A small nginx service on Cloud Run proxies `/developers/*` requests from the GCP load balancer to the Netlify-hosted site, so the browser URL stays on `interledger.org`.
8787

88-
When a PR is merged to the `main` branch, the `.github/workflows/deploy_gcs.yml` GitHub Actions workflow automatically:
88+
When a PR is merged to `main`, Netlify builds and publishes the new site automatically. GCP's Cloud CDN sits in front of the nginx proxy and caches responses for up to 1 hour.
8989

90-
1. Builds the site using Bun
91-
2. Deploys the built files to Google Cloud Storage (`gs://interledger-websites-public/developers`)
92-
3. Rebuilds and deploys the nginx-rewrite Cloud Run service (which handles the `/developers` proxy routing)
93-
4. Invalidates the CDN cache to ensure new content is served immediately
90+
#### Invalidating the CDN after a deploy
9491

95-
**Note:** There is a legacy `deploy.yaml` workflow in `.github/workflows/` which is being deprecated. New deployments should use `deploy_gcs.yml`.
92+
Because GCP Cloud CDN caches `/developers/*`, newly deployed content may take up to an hour to appear on `interledger.org/developers/`. If you need changes to go live immediately, manually trigger the **Invalidate CDN** workflow:
93+
94+
1. Go to the repo's **Actions** tab on GitHub.
95+
2. Select the **Invalidate CDN** workflow.
96+
3. Click **Run workflow** on the `main` branch.
97+
98+
This runs `gcloud compute url-maps invalidate-cdn-cache` against `/developers/*` and typically propagates within a minute.
9699

97100
For more information about the main Interledger.org infrastructure and deployment pipeline, see the [`interledger.org-v4`](https://github.com/interledger/interledger.org-v4) repository.
98101

astro.config.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ export default defineConfig({
2727
starlightLinksValidator({
2828
exclude: ['/participation-guidelines']
2929
}),
30-
starlightFullViewMode({ leftSidebarEnabled: false })
30+
starlightFullViewMode({
31+
leftSidebarEnabled: true,
32+
rightSidebarEnabled: true
33+
})
3134
],
3235
head: [
3336
{

0 commit comments

Comments
 (0)