Skip to main content

CI/CD

Deploy tokens (Pro+) let CI publish your site. The CLI reads your .page files, creates a build, and publishes it.

For a GitHub Actions example, see Deploy Micropage from GitHub Actions.

What you need

ItemWhere to get it
Deploy tokenSettings → Deploy tokens in the app. Store as a secret (e.g. MICROPAGE_DEPLOY_TOKEN).
Project UUIDShown in the app or in .micropage/project.json as projectUuid after micropage projects create or fetch. Store as a variable (e.g. MICROPAGE_PROJECT_UUID).

Steps in CI

  1. Check out your repo — it must contain the .page source files.
  2. Install the CLI:
    npm install -g micropage
  3. Deploy:
    micropage projects "$MICROPAGE_PROJECT_UUID" deploy "$MICROPAGE_DEPLOY_TOKEN" --watch

--watch streams progress until the deploy finishes or fails.

Redeploy an existing build

To publish a specific build that already exists without reading .page files, pass --build <id>:

micropage projects "$MICROPAGE_PROJECT_UUID" deploy "$MICROPAGE_DEPLOY_TOKEN" --build 987
  • Settings — create and revoke deploy tokens
  • Projectsprojects deploy option reference