Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update spec metadata and deploy to match the "minimum common" name #75

Closed
wants to merge 2 commits into from
Closed
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
6 changes: 5 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@ jobs:
run: |
mkdir -p out
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"

- name: Copy file_server.ts
run: cp .github/workflows/file_server.ts out/.file_server.ts

- name: Upload to Deno Deploy
uses: denoland/deployctl@v1
with:
project: "proposal-common-min-api"
entrypoint: "https://deno.land/[email protected]/http/file_server.ts"
entrypoint: ".file_server.ts"
root: out/
20 changes: 20 additions & 0 deletions .github/workflows/file_server.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env -S deno run --allow-net --allow-read

import { serveDir } from "https://deno.land/[email protected]/http/file_server.ts";

Deno.serve((req) => {
// If we're *.wintercg.org, 301-redirect to the new URL.
const url = new URL(req.url);
console.log(url);
if (url.hostname.endsWith(".wintercg.org")) {
url.hostname = "min-common-api.proposal.wintercg.org";
return Response.redirect(url, 301);
}

// Otherwise, serve the current dir
return serveDir(req, {
enableCors: true,
showDirListing: true,
showDotfiles: false,
});
});
4 changes: 2 additions & 2 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Shortname: common-web-platform-api
Group: wintercg
Status: w3c/CG-DRAFT
Level: none
URL: https://common-min-api.proposal.wintercg.org/
Repository: https://github.com/wintercg/proposal-common-minimum-api
URL: https://min-common-api.proposal.wintercg.org/
Repository: https://github.com/wintercg/proposal-minimum-common-api
Editor: James M Snell, Cloudflare https://cloudflare.com/, [email protected]
Abstract: Minimum Common Web Platform API for Non-Browser ECMAScript-based runtimes.
Markup Shorthands: markdown yes
Expand Down
Loading