Providers

GitLab Pages

Deploy Nitro apps to GitLab Pages.

Preset: gitlab_pages

Read more in GitLab Pages.

Setup

Follow the steps to create a GitLab Pages site.

Deployment

  1. Here is an example GitLab Pages workflow to deploy your site to GitLab Pages:
.gitlab-ci.yml
image: node:lts
before_script:
  - npx nypm install
pages:
  cache:
    paths:
      - node_modules/
  variables:
    NITRO_PRESET: gitlab_pages
  script:
    - npm run build
  artifacts:
    paths:
      - .output/public
  publish: .output/public
  rules:
    # This ensures that only pushes to the default branch
    # will trigger a pages deploy
    - if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH