Open-Source Wikis

/

GitLab

/

Features

/

GitLab Pages

gitlab-org/gitlab

GitLab Pages

Static site hosting served from a CI artifact.

Two pieces

  • gitlab-pages — separate Go binary at https://gitlab.com/gitlab-org/gitlab-pages (version pinned in GITLAB_PAGES_VERSION).
  • This repo's Pages domain code (app/models/pages_*, app/services/pages/, app/services/projects/update_pages_*).

How it works

sequenceDiagram
    Pipeline->>Rails: Job artifact 'public/' uploaded
    Rails->>Object: Store artifact zip
    Pipeline->>Rails: Job finished, publishes pages
    Rails->>PagesDeployment: Create record + signed URL
    Browser->>Pages: HTTP /index.html
    Pages->>Object: GET signed URL
    Object-->>Pages: zip
    Pages-->>Browser: streamed HTML

The Pages daemon lazily fetches the artifact zip from object storage and serves files out of it without unpacking.

Source

Concern Location
Models app/models/pages_deployment.rb, pages_domain.rb, project_pages_metadatum.rb
Services app/services/pages/, app/services/projects/update_pages_service.rb
Workers app/workers/pages/, app/workers/projects/update_pages_*
API lib/api/pages_domains.rb, lib/api/internal/pages.rb
Settings config/initializers/pages.rb

Domains and certs

PagesDomain stores custom domain records, optional Let's Encrypt certs, and TLS verification state. The Lets Encrypt integration lives in lib/gitlab/lets_encrypt.rb plus app/services/pages_domains/.

Pages access control (EE)

EE adds private Pages with token-based auth — visitors authenticate against GitLab and the daemon validates a JWT cookie.

Multi-deployment

A project can have multiple Pages deployments (per branch, per MR). Each is identified by a PagesDeployment row and served from a path prefix.

Cleanup

Pages::DeploymentsScheduledCleanupCronWorker removes inactive deployments past TTL.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

GitLab Pages – GitLab wiki | Factory