Skip to content
Snippets Groups Projects
This GitLab CI configuration is valid. Learn more
.gitlab-ci.yml 811 B
# Job name has to be `pages`. See https://docs.gitlab.com/ee/user/project/pages/#how-it-works
pages:
  image: node
  variables:
    NUXT_APP_BASE_URL: /
  before_script:
    - npm ci --cache .npm --prefer-offline
  script:
    # Specify the steps involved to build your app here
    - npm run generate
  cache: # https://docs.gitlab.com/ee/ci/caching/#cache-nodejs-dependencies
    key:
      files:
        - package-lock.json
    paths:
      - .npm/
  artifacts:
    paths:
      # The directory that contains the built files to be published
      - .output/public
  # The directory that contains the built files to be published
  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