代码拉取完成,页面将自动刷新
image: node:latest
stages:
- build
- deploy
.preview_job: &preview_job
only:
- master
.production_job: &production_job
only:
- /^release-.*$/
.build_template: &build_template
stage: build
dependencies: []
artifacts:
paths:
- build/
script:
- yarn build
- gzip -k -6 $(find build/ -type f)
.deploy_template: &deploy_template
stage: deploy
script:
- yarn firebase use default
- yarn firebase deploy --only hosting:$DEPLOY_ENV -m "Pipeline $CI_PIPELINE_ID, Build $CI_BUILD_ID" --non-interactive
cache:
paths:
- node_modules/
before_script:
- yarn install
build-preview:
<<: *build_template
<<: *preview_job
variables:
DEPLOY_ENV: preview
build-production:
<<: *build_template
<<: *production_job
variables:
DEPLOY_ENV: production
deploy-preview:
<<: *deploy_template
<<: *preview_job
dependencies:
- build-preview
environment:
name: preview
url: https://preview.regexper.com
variables:
DEPLOY_ENV: preview
deploy-production:
<<: *deploy_template
<<: *production_job
dependencies:
- build-production
environment:
name: production
url: https://regexper.com
variables:
DEPLOY_ENV: production
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。