Providers
GitLab 页面
¥GitLab Pages
将 Nitro 应用部署到 GitLab Pages。
预设:gitlab_pages
¥Preset: gitlab_pages
设置
¥Setup
请按照 创建 GitLab Pages 站点 的步骤操作。
¥Follow the steps to create a GitLab Pages site.
部署
¥Deployment
- 以下是使用 GitLab Pages 部署你的网站到 GitLab Pages 的 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