GitLab Pages

GitLab Pages

Deploy Nitro apps to GitLab Pages.

Preset: gitlab_pages

相关阅读: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
yaml
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