Deployment
Build on a supported runner with a Publier seat, then publish dist to a static host.
A Publier static build emits HTML, JavaScript, CSS, and assets in dist/. You can publish that directory to Cloudflare Pages, Netlify, Vercel, GitHub Pages, or your own static server.
Build prerequisites
Use Linux x64 with Node 24 LTS, pnpm 11, and Bun available on PATH. Commit pnpm-lock.yaml and install with corepack pnpm install --frozen-lockfile. The scaffold’s pnpm run build script runs bunx --bun astro build; it does not require a separate Publier CLI installation.
On a signed-in developer machine, publier build is also supported. Both commands require a seat. Follow installation and tokens first.
For GitHub Actions, connect the repository using the Publier portal’s connect a repo for CI flow and ensure it has an active subscription. The public CI action claims a credential for each job and seeds its configuration. It needs actions: read and outbound HTTPS. Pass its proof key as well as its token; these CI builds cannot run fully offline.
GitHub Pages
Enable GitHub Actions as the repository’s Pages source, then add this workflow. The build job installs the complete toolchain; the deploy job receives the static artifact.
name: Deployon: push: branches: [main]permissions: {}jobs: build: runs-on: ubuntu-latest permissions: contents: read actions: read steps: - uses: actions/checkout@v7 - uses: actions/setup-node@v7 with: node-version: '24' - run: corepack enable - uses: oven-sh/setup-bun@v2 - run: corepack pnpm install --frozen-lockfile - id: claim uses: publier/releases/.github/actions/publier-ci-claim@9ebd51f9bce8ef6e4c22a37d5f622e33d5e52054 - run: corepack pnpm run build env: PUBLIER_TOKEN: ${{ steps.claim.outputs.token }} ATESTUM_PROOF_KEY: ${{ steps.claim.outputs.proof-key }} - uses: actions/upload-pages-artifact@v5 with: path: ./dist deploy: needs: build runs-on: ubuntu-latest permissions: pages: write id-token: write environment: name: github-pages url: ${{ steps.deploy.outputs.page_url }} steps: - id: deploy uses: actions/deploy-pages@v5The workflow assumes the site is served at the domain root. Subpath hosting, such as https://example.github.io/docs/, is not qualified for the built-in search: its asset URLs are fixed at /pagefind/pagefind-ui.css and /pagefind/pagefind-ui.js. Setting Astro’s site and base alone does not make that search work under a subpath. The Pages deployment token is separate from Publier’s build credential.
Other static hosts
The simplest path is to build dist/ in the workflow above and publish the artifact with your host’s deployment tool. Replace the Pages upload and deploy steps with your provider’s supported upload action or CLI. Keep the toolchain setup, repository claim, and build credential environment together in the build job.
If you build inside a provider’s own build environment, it must supply Linux x64, Node/Corepack, pnpm, Bun, and a provisioned seat credential plus its required cache or proof key. Astro auto-detection does not install the Publier CLI or establish those credentials. A PUBLIER_TOKEN field alone is not a complete setup. Prefer the GitHub build path until your provider’s credential setup is established.
Preview locally
corepack pnpm run previewAstro preview serves the built files for inspection. It does not reproduce your host’s headers, redirects, access controls, or server-side routes. Verify those on the deployed host.
Your own static server
Publish dist/ as the web root. Credentials are build inputs; never publish token caches, proof key files, or CI environment files with the artifact. Access control for private readers belongs at the host.
Cache headers
Hashed assets in dist/_astro/ can use Cache-Control: public, max-age=31536000, immutable. Keep HTML on a shorter TTL, such as Cache-Control: public, max-age=60, so content updates reach readers. Configure these headers through your host’s supported mechanism.
Keep each qualified artifact for upgrades and rollbacks. Deploy HTML, assets, and search as one release.