workflows/website.yml builds the documentation at / and the Python demo at
/static/web/, then publishes them to the main branch of
pocketpy/pocketpy.github.io. Pull requests only build; pushes to main and
manual runs on main can publish. The published root contains an empty
.nojekyll file to disable Jekyll.
Before the first deployment:
WEBSITE_DEPLOY_TOKEN Actions secret to pocketpy/pocketpy. Use a
personal access token with Contents: Read and write access to
pocketpy/pocketpy.github.io (and organization approval if required).pocketpy/pocketpy.github.io, configure Pages to Deploy from a branch,
using main and / (root). Leave the custom domain empty.https://pocketpy.github.io/ and https://pocketpy.github.io/static/web/.After verifying the new site, configure a Cloudflare Single Redirect for
pocketpy.dev. Enable Cloudflare proxying (orange cloud) for the old domain's
DNS records; DNS-only records cannot apply redirect rules.
http.host in {"pocketpy.dev" "www.pocketpy.dev"}concat("https://pocketpy.github.io", http.request.uri.path)Only include www.pocketpy.dev if that hostname is configured. For example,
https://pocketpy.dev/static/web/?example=hello should return a 301 redirect to
https://pocketpy.github.io/static/web/?example=hello.
This redirect is configured in Cloudflare, not generated by the workflow. Keep the old domain and redirect active during the migration, and submit the new sitemap and address change in Google Search Console.
References: deployment action, Cloudflare redirect setup, Google's permanent redirects.