How to use autopub check one and two
AI-generatedWhat is autopub check?
Autopub check is a two-step verification that runs before you push to production. It checks that your build passes, that your routes are wired, and that your legal pages are live.
Use it in CI or as a local pre-deploy hook. It does not touch Stripe or Shopify tokens.
Autopub check one: the quick smoke test
Autopub check one runs a minimal build and a basic route check. It is fast enough for a late-night deploy.
It verifies that Vite compiles without errors and that the root layout and home page render.
It does not run accessibility or image alt checks. It does not run e2e clicks.
Autopub check two: the full suite
Autopub check two runs the full build, then checks routes, then runs a short accessibility pass, then confirms the legal pages exist.
It is slower but safer for a release branch. It still does not touch payments or store data.
Use it when you want a higher confidence before you merge main.
When to run autopub check one
- Local development: run it after you change routes or layouts.
- Feature branches: run it before you create a pull request.
- CI: run it on every push to the main branch.
Keep the timeout short so it does not block your queue.
When to run autopub check two
- Release branches: run it before you create a release PR.
- Pre-deploy: run it as the last step before you push to production.
- Compliance: run it when you update privacy or terms content.
Allow extra time for the accessibility pass and the legal page checks.
How to run autopub check one locally
From the project root, run the smoke test task. It builds and then checks the root layout and the home page.
It prints a short summary: pass, fail, and the first error if it fails.
Do not run it in a Docker container that does not have Node 20.
How to run autopub check two locally
From the project root, run the full verification task. It builds, checks routes, runs the accessibility pass, and confirms the legal pages.
It prints a short summary: pass, fail, and the first error if it fails.
Do not run it in a Docker container that does not have Node 20
Practical tips for busy teams
Pin the Node version in your CI image so the build and check use the same runtime.
Run the checks in a separate job so a failed check does not hold the deploy job hostage.
Store the check artifacts in a short-lived path so disk usage stays low.
Fail fast: do not run the full suite if the build itself is not green.
Log the first error only so the summary stays readable for busy operators.
Example: a release branch workflow
Create a release branch from main. Run the full verification task on that branch. If it passes, create a pull request with the check summary in the description. Merge only after the summary says pass.
If the check fails, open an issue with the first error code. Fix the issue, then run the check again on the same branch.
Once the check passes, the deploy job can run without waiting for a second approval.
Common questions
Q: Can I skip the accessibility pass for a hotfix? A: You can run the smoke test instead, but document the skip in the PR notes.
Q: What if the legal page check fails? A: Update the missing page in the repo, then run the full verification again.
Q: Does the check modify my source files? A: No. It only reads the build output and the live routes.
Q: How do I test a new route without deploying? A: Run the smoke test after you add the route, then run the full verification once the route is wired in the layout.
Q: Can I run the check from a fork? A: Yes, as long as the fork has write access to the repo and the CI token.
Q: What if the check times out? A: Increase the CI timeout for the full verification job, or split the steps into two jobs.
Q: Do I need a separate token for the check? A: No. The check uses the same CI token that the deploy job uses.
Q: How do I silence the check in a dry run? A: Pass the dry-run flag so the check runs without blocking the deploy job.
Q: What language does the summary use? A: English, with the first error code in square brackets.
Practical tips for busy teams
Pin the Node version in your CI image so the build and check use the same runtime.
Run the checks in a separate job so a failed check does not hold the deploy job hostage.
Store the check artifacts in a short-lived path so disk usage stays low.
Fail fast: do not run the full suite if the build itself is not green.
Log the first error only so the summary stays readable for busy operators.
Example: a release branch workflow
Create a release branch from main. Run the full verification task on that branch. If it passes, create a pull request with the check summary in the description. Merge only after the summary says pass.
If the check fails, open an issue with the first error code. Fix the issue, then run the check again on the same branch.
Once the check passes, the deploy job can run without waiting for a second approval.
Common questions
Q: Can I skip the accessibility pass for a hotfix? A: You can run the smoke test instead, but document the skip in the PR notes.
Q: What if the legal page check fails? A: Update the missing page in the repo, then run the full verification again.
Q: Does the check modify my source files? A: No. It only reads the build output and the live routes.
Q: How do I test a new route without deploying? A: Run the smoke test after you add the route, then run the full verification once the route is wired in the layout.
Q: Can I run the check from a fork? A: Yes, as long as the fork has write access to the repo and the CI token.
Q: What if the check times out? A: Increase the CI timeout for the full verification job, or split the steps into two jobs.
Q: Do I need a separate token for the check? A: No. The check uses the same CI token that the deploy job uses.
Q: How do I silence the check in a dry run? A: Pass the dry-run flag so the check runs without blocking the deploy job.
Q: What language does the summary use? A: English, with the first error code in square brackets.