Skip to content

Deploy to GitLab Pages

This pipeline is designed to build and deploy a Zensical site to GitLab Pages.

.gitlab-ci.yml
pages:
  stage: deploy
  image: cgr.dev/chainguard/python:latest-dev
  variables:
    UV_LINK_MODE: copy          
    UV_CACHE_DIR: .uv-cache
  cache:
    - key:
        files:
          - uv.lock
      paths:
        - $UV_CACHE_DIR
  script:
    - uv sync --frozen
    - uv run zensical build --clean 
  after_script:
    - uv cache prune --ci
  pages:
    publish: site 
  rules:
    - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'