Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
8762ad13ab | ||
|
b637d7308f |
17
.firebaserc
Normal file
17
.firebaserc
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"projects": {
|
||||||
|
"default": "regexper"
|
||||||
|
},
|
||||||
|
"targets": {
|
||||||
|
"regexper": {
|
||||||
|
"hosting": {
|
||||||
|
"production": [
|
||||||
|
"regexper"
|
||||||
|
],
|
||||||
|
"preview": [
|
||||||
|
"regexper-preview"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -3,3 +3,5 @@ node_modules
|
|||||||
build
|
build
|
||||||
docs
|
docs
|
||||||
tmp
|
tmp
|
||||||
|
.firebase/
|
||||||
|
firebase-debug.log
|
||||||
|
@ -2,6 +2,32 @@ image: node:8
|
|||||||
|
|
||||||
stages:
|
stages:
|
||||||
- build
|
- 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:
|
cache:
|
||||||
paths:
|
paths:
|
||||||
@ -10,16 +36,38 @@ cache:
|
|||||||
before_script:
|
before_script:
|
||||||
- yarn install
|
- yarn install
|
||||||
|
|
||||||
pages:
|
build-preview:
|
||||||
stage: build
|
<<: *build_template
|
||||||
|
<<: *preview_job
|
||||||
variables:
|
variables:
|
||||||
|
DEPLOY_ENV: preview
|
||||||
|
GA_PROP: $PREVIEW_GA_PROPERTY
|
||||||
|
|
||||||
|
build-production:
|
||||||
|
<<: *build_template
|
||||||
|
<<: *production_job
|
||||||
|
variables:
|
||||||
|
DEPLOY_ENV: production
|
||||||
GA_PROP: $PROD_GA_PROPERTY
|
GA_PROP: $PROD_GA_PROPERTY
|
||||||
script:
|
|
||||||
- BUILD_PATH="$(pwd)/public" yarn gulp build
|
deploy-preview:
|
||||||
- rm -r public/__discard__
|
<<: *deploy_template
|
||||||
- gzip -k -6 $(find public/ -type f)
|
<<: *preview_job
|
||||||
artifacts:
|
dependencies:
|
||||||
paths:
|
- build-preview
|
||||||
- public
|
environment:
|
||||||
only:
|
name: preview
|
||||||
- master
|
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
|
||||||
|
12
firebase.json
Normal file
12
firebase.json
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"hosting": [
|
||||||
|
{
|
||||||
|
"target": "production",
|
||||||
|
"public": "build"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"target": "preview",
|
||||||
|
"public": "build"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -26,6 +26,7 @@
|
|||||||
"docco": "^0.7.0",
|
"docco": "^0.7.0",
|
||||||
"extract-loader": "^1.0.0",
|
"extract-loader": "^1.0.0",
|
||||||
"file-loader": "^0.11.2",
|
"file-loader": "^0.11.2",
|
||||||
|
"firebase-tools": "^6.2.2",
|
||||||
"folder-toc": "^0.1.0",
|
"folder-toc": "^0.1.0",
|
||||||
"gulp": "^3.8.10",
|
"gulp": "^3.8.10",
|
||||||
"gulp-connect": "^5.0.0",
|
"gulp-connect": "^5.0.0",
|
||||||
|
Loading…
Reference in New Issue
Block a user