Skip to content

v2.0.3: Deploy to GitHub Pages on merge to master - #56

Draft
gitluis wants to merge 4 commits into
masterfrom
deploy-github-pages
Draft

gitluis wants to merge 4 commits into
masterfrom
deploy-github-pages

Conversation

@gitluis

@gitluis gitluis commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

On hold — draft on purpose. Part of the v2.0 — Public launch milestone. This is the PR that makes FinLens live on the web, so keep it open until the app is more mature, renamed and the custom domain is bought. Mark it "Ready for review" when you want to merge it.

Summary

Adds .github/workflows/pages.yml. On every push to master (that is, after a merge), or when you run it by hand from the Actions tab, it publishes the app as static files to GitHub Pages. Pull requests never deploy, so opening this PR doesn't publish anything. The app itself doesn't change.

  • Only the app is published: index.html, js/ and samples/ (about 500 KB). docs/, CLAUDE.md, tests and CI files stay in the repo but aren't served.
  • Safety check: the build fails, and publishes nothing, if a state file, backup, export or saved AI answer ends up in the site folder: the names from v2.0.2: Generic storage names (app_db, app-state.json…) + rename script #58 (app-state*.json, app-export-*, ai-analysis-*, ai-history-*), the older finlens-* ones, or anything under data/.
  • Your data doesn't move. Pages serves only the code. Transactions, settings and the API key stay in each visitor's own browser and folder.
  • CLAUDE.md §23 Hosting (new; §23 because the stack adds §22 Migrations): what's served, the one-site-per-origin rule, custom-domain setup, and the Pages limits.

Version: v2.0.3 (renumbered from v2.0.2: the rename PR #58 takes v2.0.2 so it merges first).

Before merging (one-time setup)

  1. Settings → Pages → Build and deployment → Source: "GitHub Actions". Without this, the first deploy fails at the Deploy step.
  2. Custom domain (once renamed and bought): follow Custom domain setup below, in its order (verify, then the repo setting, then DNS).
  3. Until there's a custom domain, don't publish any other repo on Pages from this account. Every Pages site of an account shares the origin https://gitluis.github.io, so another site there could read FinLens's browser data.
  4. Rename first. The workflow has no name in it, but the URL is gitluis.github.io/<repo name>/, and a rename after people use it moves them to a new origin with empty browser data.

Custom domain setup (placeholders)

Replace the placeholders, then follow the steps in this order. GitHub asks for verification and the repo setting before DNS, so nobody else can claim the domain while DNS points at GitHub.

Placeholder Meaning Example
<DOMAIN> the domain you buy example.app
<SUBDOMAIN> where the app lives, if not on the root app → app.example.app
<SITE> the full address people type app.example.app or example.app
<USERNAME> the GitHub account gitluis
<REPO> the repo name after the rename finlens
  1. Buy <DOMAIN> (Cloudflare or Porkbun). Delete any default records the registrar adds (parking page, www redirect).

  2. Verify <DOMAIN> on your account (profile, not repo): profile picture → Settings → Pages → Add a domain → <DOMAIN>. GitHub shows a TXT record; add it at your DNS host:

    Type Name Value
    TXT _github-pages-challenge-<USERNAME> the value GitHub shows

    Check it with dig _github-pages-challenge-<USERNAME>.<DOMAIN> +short TXT, then Verify. Keep this record forever. Verifying <DOMAIN> also covers <SUBDOMAIN>.<DOMAIN>.

  3. Set the domain on this repo: this repo → Settings → Pages → Custom domain → <SITE> → Save. (Never on a <USERNAME>.github.io user-site repo, or every project site shares it.)

  4. Add the DNS record(s), depending on <SITE>:

    A subdomain (<SUBDOMAIN>.<DOMAIN>, recommended):

    Type Name Value
    CNAME <SUBDOMAIN> <USERNAME>.github.io

    The root domain (<DOMAIN>):

    Type Name Value
    A @ 185.199.108.153
    A @ 185.199.109.153
    A @ 185.199.110.153
    A @ 185.199.111.153
    AAAA @ 2606:50c0:8000::153
    AAAA @ 2606:50c0:8001::153
    AAAA @ 2606:50c0:8002::153
    AAAA @ 2606:50c0:8003::153
    • The CNAME points to <USERNAME>.github.io without the repo name, never to a *.pages.github.io address.
    • On Cloudflare: set each record to DNS only (grey cloud). Proxied (orange) can stop GitHub issuing the HTTPS certificate.
    • No wildcard records (*.<DOMAIN>): they allow takeovers even with a verified domain.
  5. Wait for the check: back in this repo's Settings → Pages, the DNS check turns green. DNS can take up to 24 hours.

  6. Enforce HTTPS (same page) once it's offered; that can take up to 24 hours too.

  7. Check it: https://<SITE> opens the app with a valid certificate, and https://<USERNAME>.github.io/<REPO>/ redirects to it.

With an Actions deploy, the domain lives in the repo setting, so no CNAME file is needed in the repo. If the custom domain is ever removed, delete its DNS records right away (and keep the TXT one), so the name can't be claimed.

Automated checks: earlier run, not re-run · commit not recorded

Moved unchanged from this PR's "Test results" comment on 2026-11-04; not re-run, so not in the new table format. Originally a description section titled "How it was tested".

  • Ran the same assemble step locally and served the result from a /finlens/ subpath, the way Pages serves a project site. The app booted with all 24 views registered, no page errors, no 404s, and samples/ loaded by relative path (as the AI Eval view does).
  • The data-file guard: the exact step script blocked each of 10 test files (5 new names, 4 old names, one file under data/), and let a clean site through.
  • Not tested: an actual Pages deploy. That needs Pages turned on and a push to master, and the workflow only runs after merge. pull_request doesn't trigger it, so there's no Actions run on this PR.
Manual QA steps (after merging)
  1. Open the Actions tab → Deploy to GitHub Pages. The run should show two green jobs, Build site and Deploy.
  2. Open Build site → Assemble site. The list of published files should show only index.html, .nojekyll, js/… and samples/….
  3. Click the URL on the Deploy job (or Settings → Pages). FinLens should open with the version v2.0.3 in the footer.
  4. Click Choose folder and pick a folder with your CSVs. Edge or Chrome should ask for access, as it does locally. This is the first test of the real permission prompt on HTTPS.
  5. Reload the page. Your data should still be there, since the browser data lives on the new origin.
  6. (If something's wrong) Settings → Pages → Unpublish site takes it offline straight away.

Please check before merging

https://claude.ai/code/session_013Z8iBUNj6C627mxmm1CurV


Generated by Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Z8iBUNj6C627mxmm1CurV
@gitluis gitluis added this to the v2.0 — Public launch milestone Nov 4, 2026 — with Claude
@gitluis gitluis added on-hold Ready, but intentionally left open until a later decision hosting Deployment and hosting (GitHub Pages, domain) labels Nov 4, 2026 — with Claude
…low the merge order

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Z8iBUNj6C627mxmm1CurV
@gitluis gitluis changed the title v2.0.2: deploy to GitHub Pages on merge to master v2.0.3: deploy to GitHub Pages on merge to master Nov 4, 2026
gitluis pushed a commit that referenced this pull request Nov 4, 2026
…int to #56 for the records

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Z8iBUNj6C627mxmm1CurV
…the old finlens-* ones

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Z8iBUNj6C627mxmm1CurV
@gitluis gitluis changed the title v2.0.3: deploy to GitHub Pages on merge to master v2.0.3: Deploy to GitHub Pages on merge to master Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

hosting Deployment and hosting (GitHub Pages, domain) on-hold Ready, but intentionally left open until a later decision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants