...
 
Commits (2)
{
"projects": {
"default": "regexper"
},
"targets": {
"regexper": {
"hosting": {
"production": [
"regexper"
],
"preview": [
"regexper-preview"
]
}
}
}
}
......@@ -3,3 +3,5 @@ node_modules
build
docs
tmp
.firebase/
firebase-debug.log
......@@ -2,6 +2,32 @@ image: node:8
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 gulp build
- rm -r build/__discard__
- gzip -k -6 $(find build/ -type f)
.deploy_template: &deploy_template
stage: deploy
script:
- yarn firebase use --token $FIREBASE_DEPLOY_KEY default
- yarn firebase deploy --only hosting:$DEPLOY_ENV -m "Pipeline $CI_PIPELINE_ID, Build $CI_BUILD_ID" --non-interactive --token $FIREBASE_DEPLOY_KEY
cache:
paths:
......@@ -10,16 +36,38 @@ cache:
before_script:
- yarn install
pages:
stage: build
build-preview:
<<: *build_template
<<: *preview_job
variables:
DEPLOY_ENV: preview
GA_PROP: $PREVIEW_GA_PROPERTY
build-production:
<<: *build_template
<<: *production_job
variables:
DEPLOY_ENV: production
GA_PROP: $PROD_GA_PROPERTY
script:
- BUILD_PATH="$(pwd)/public" yarn gulp build
- rm -r public/__discard__
- gzip -k -6 $(find public/ -type f)
artifacts:
paths:
- public
only:
- master
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
{
"hosting": [
{
"target": "production",
"public": "build"
},
{
"target": "preview",
"public": "build"
}
]
}
This source diff could not be displayed because it is too large. You can view the blob instead.