这个页面不存在。
+This page doesn’t exist.
+ +diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml deleted file mode 100644 index 1e01858..0000000 --- a/.github/workflows/pages.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Website - -on: - push: - branches: [main] - paths: - - "site/**" - - ".github/workflows/pages.yml" - workflow_dispatch: - -permissions: - contents: read - -concurrency: - group: pages - cancel-in-progress: false - -jobs: - deploy: - runs-on: ubuntu-latest - timeout-minutes: 10 - permissions: - contents: read - pages: write - id-token: write - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - steps: - - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 - - uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0 - - uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 - with: - path: site - - id: deployment - uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1 diff --git a/scripts/check_hygiene.py b/scripts/check_hygiene.py index 11d8576..a847f1f 100644 --- a/scripts/check_hygiene.py +++ b/scripts/check_hygiene.py @@ -22,6 +22,7 @@ "README.zh-CN.md", # Simplified Chinese README. "site/index.html", # Language switcher on the English website (#160). "site/zh/index.html", # Simplified Chinese website (#160). + "site/404.html", # Bilingual not-found page of the website (#160). "docs/glossary.md", # Chinese UI terms alongside English glossary prose (#67). "Sources/AskKeyAppKit/Resources/zh-Hans.lproj/InfoPlist.strings", # Localized product name. "Tests/AskKeyAppTests/AgentClientConnectionPolicyTests.swift", # Chinese client connection errors. diff --git a/site-src/README.md b/site-src/README.md new file mode 100644 index 0000000..4d50284 --- /dev/null +++ b/site-src/README.md @@ -0,0 +1,16 @@ +# Website source and deployment + +`site/` is the website at https://askkey.sudohg.com, served as is: static HTML, CSS, a small script and assets. The only bundled code is the "How it works" film; its source and build are in [`how/`](how/README.md). + +## Deploying + +The site is a Cloudflare Pages project named `askkey` (Direct Upload), with the custom domain `askkey.sudohg.com`. Nothing deploys automatically: after a change to `site/` is merged into `main`, the maintainer (or an agent with the maintainer's approval) deploys that commit from a clean checkout: + +```sh +npx wrangler pages deploy site --project-name askkey --branch main \ + --commit-hash "$(git rev-parse HEAD)" --commit-message "$(git log -1 --format=%s)" +``` + +Wrangler reads a Cloudflare API token with Pages write access from `CLOUDFLARE_API_TOKEN` and the account from `CLOUDFLARE_ACCOUNT_ID`. Never put the token in a file, an argument or a log. + +Before deploying, run `npm run stamp` in `how/` if any CSS or JS changed, so pages never pair with a cached old file, and check both pages in a browser. diff --git a/site/404.html b/site/404.html new file mode 100644 index 0000000..e60184a --- /dev/null +++ b/site/404.html @@ -0,0 +1,29 @@ + + +
+ + +This page doesn’t exist.
+ +