Skip to content

GitLab Pages

The Archidocs GitLab CI template checks the Workspace, builds the viewer and publishes it to GitLab Pages. Include it in .gitlab-ci.yml:

.gitlab-ci.yml
include:
- remote: https://raw.githubusercontent.com/chalharb/archidocs/v1/templates/gitlab/archidocs.gitlab-ci.yml
inputs:
images: true

It adds two jobs:

  • pages, on pushes to the default branch and on tags: archidocs check, then archidocs build into public/, published to GitLab Pages. A failed check publishes nothing, so the last good site stays up.
  • archidocs-preview, on merge requests: a PR preview kept as a merge request artifact, “Archidocs preview”.
  • working-directory: where to run Archidocs.
  • keep: how many past Revisions the site keeps, or all.
  • images: also publish each Saved View as an SVG. See Saved View images.
  • preview: the merge request job, on by default.
  • version: the archidocs npm version to run.
  • image: the Node.js image, node:24 by default.

Each is described in the GitLab template reference.

The template sets GIT_DEPTH: 0, because the site shows past Revisions and needs the full history. It keeps .archidocs/cache/ in the GitLab cache with a key that names the Bundle schemaVersion, so a template for a new schema starts a new cache and rebuilds every kept Revision once.