About 20 minutes for one workflow

GitHub Pages to BinHTML

Stop committing generated HTML reports into a Pages branch. Publish them from the same job that builds them, with expiry instead of accumulation.

Do not migrate if

Migrating has a cost and it is not always worth paying. If one of these describes your situation, stay where you are.

  • The HTML is authored by hand and genuinely belongs in version control alongside the code.
  • You want the page publicly discoverable and linkable, which is what Pages is for.
  • The site is documentation with navigation across many pages rather than a standalone report.

Before you start

  • A BinHTML API key stored as a repository or organisation secret.
  • The workflow that currently commits or deploys the generated HTML.
  • Agreement on retention: reports that used to live forever in a branch will now expire unless you publish them as permanent Pro artifacts.

Steps

  1. 01

    Add the API key as a secret

    Store the key as BINHTML_API_KEY in repository or organisation secrets. Never inline it in the workflow file.

  2. 02

    Replace the deploy step with a publish step

    Wherever the workflow currently commits the report or pushes to the Pages branch, call the publish endpoint instead and capture the returned URL.

    GitHub Actions step

    Language: yaml. Replace $BINHTML_API_KEY with a key from your settings.

    - name: Publish HTML report
      env:
        BINHTML_API_KEY: ${{ secrets.BINHTML_API_KEY }}
      run: |
        SHARE_URL=$(jq -n \
          --arg title "Report for ${{ github.sha }}" \
          --arg project "CI reports" \
          --rawfile html ./out/report.html \
          '{title: $title, projectName: $project, visibility: "unlisted", sourceHtml: $html}' \
        | curl -sS -X POST https://binhtml.com/api/v1/artifacts \
            -H "Authorization: Bearer $BINHTML_API_KEY" \
            -H "Content-Type: application/json" \
            -d @- \
        | jq -r '.urls.share')
        echo "Report: $SHARE_URL" >> "$GITHUB_STEP_SUMMARY"
  3. 03

    Put the link where reviewers already look

    Writing the URL into the job summary, or posting it as a pull request comment, is the part that makes the change stick. A published report nobody can find is worse than the branch you replaced.

  4. 04

    Decide retention per report type

    Pull request reports usually want a short expiry. Release and audit packets usually want permanence, which means Pro. Choosing deliberately is the point of moving off a branch that kept everything forever.

  5. 05

    Clean up the Pages branch

    Once a few runs have published successfully, remove the deploy step and prune the accumulated reports. Keep the branch history if the old reports have any audit value.

Verify the migration

Work through these before you remove anything from the old tool. A migration is finished when someone other than you has opened the new link successfully.

  • A workflow run publishes and the URL appears in the job summary.
  • The published report renders identically to the Pages version.
  • The repository stops gaining generated HTML on each run.
  • Someone outside the repository can open the link, if that is what you intended.

Known gotchas

Relative asset paths break

Pages served a directory, so relative links to CSS, JS, and images worked. A BinHTML artifact is one document, so those assets must be inlined or absolute.

Links between reports need rethinking

If report pages linked to each other, publish them into a project and share the project link, or make the set a single document.

Public discoverability goes away

Artifact pages are noindex. If part of the value was that anyone could find the report through search, Pages was doing something BinHTML deliberately does not.

Questions about this migration

How do I migrate from GitHub Pages to BinHTML?

Replace the commit-and-deploy step with a single publish call in your workflow, so generated reports stop landing in version control.

How long does migrating from GitHub Pages take?

About 20 minutes for one workflow. The steps on this page cover creating an API key, publishing one document to confirm the output, switching repeat publishing to version updates, and verifying the result before you retire the old links.

When should I not migrate from GitHub Pages?

The HTML is authored by hand and genuinely belongs in version control alongside the code. You want the page publicly discoverable and linkable, which is what Pages is for. The site is documentation with navigation across many pages rather than a standalone report.

Will the share link change when the content is updated?

No. Publishing a new version against an existing artifact id updates the content behind the same URL, so anyone already holding the link keeps working access.

Next steps