Skip to content

Commit 12eab86

Browse files
committed
Update spec metadata and deploy to match the "minimum common" name
This PR updates the URL and repo of the Minimum Common API in the spec's metadata to reflect the new locations (with the "minimum common" order, rather than "common minimum"). It also updates the deploy so that the old URL redirects to the new one.
1 parent f91410e commit 12eab86

File tree

3 files changed

+26
-3
lines changed

3 files changed

+26
-3
lines changed

.github/workflows/deploy.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,13 @@ jobs:
1717
run: |
1818
mkdir -p out
1919
curl --retry 2 --fail https://api.csswg.org/bikeshed/ --output out/index.html --header "Accept: text/plain, text/html" -F die-on=fatal -F file=@"index.bs"
20+
21+
- name: Copy file_server.ts
22+
run: cp .github/workflows/file_server.ts out/.file_server.ts
23+
2024
- name: Upload to Deno Deploy
2125
uses: denoland/deployctl@v1
2226
with:
2327
project: "proposal-common-min-api"
24-
entrypoint: "https://deno.land/[email protected]/http/file_server.ts"
28+
entrypoint: ".file_server.ts"
2529
root: out/

.github/workflows/file_server.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env -S deno run --allow-net --allow-read
2+
3+
import { serveDir } from "https://deno.land/[email protected]/http/file_server.ts";
4+
5+
Deno.serve((req) => {
6+
// If we're *.wintercg.org, 301-redirect to the new URL.
7+
const url = new URL(req.url);
8+
console.log(url);
9+
if (url.hostname.endsWith(".wintercg.org")) {
10+
url.hostname = "min-common-api.proposal.wintercg.org";
11+
return Response.redirect(url, 301);
12+
}
13+
14+
// Otherwise, serve the current dir
15+
return serveDir(req, {
16+
enableCors: true,
17+
showDotfiles: false,
18+
});
19+
});

index.bs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ Shortname: common-web-platform-api
44
Group: wintercg
55
Status: w3c/CG-DRAFT
66
Level: none
7-
URL: https://common-min-api.proposal.wintercg.org/
8-
Repository: https://github.com/wintercg/proposal-common-minimum-api
7+
URL: https://min-common-api.proposal.wintercg.org/
8+
Repository: https://github.com/wintercg/proposal-minimum-common-api
99
Editor: James M Snell, Cloudflare https://cloudflare.com/, [email protected]
1010
Abstract: Minimum Common Web Platform API for Non-Browser ECMAScript-based runtimes.
1111
Markup Shorthands: markdown yes

0 commit comments

Comments
 (0)