mirror of
https://github.com/hectorm/hblock.git
synced 2026-04-21 22:46:32 +05:30
Firebase migration
This commit is contained in:
parent
124c9f82ea
commit
9f3204085b
3 changed files with 64 additions and 9 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -1,2 +1,5 @@
|
|||
dist/
|
||||
node_modules/
|
||||
.firebaserc
|
||||
firebase-debug.log
|
||||
|
||||
/dist/
|
||||
|
|
|
|||
|
|
@ -1,13 +1,29 @@
|
|||
image: alpine
|
||||
image: node:alpine
|
||||
|
||||
pages:
|
||||
script:
|
||||
cache:
|
||||
paths:
|
||||
- node_modules/
|
||||
|
||||
stages:
|
||||
- build
|
||||
- deploy
|
||||
|
||||
before_script:
|
||||
- apk add --no-cache curl file gawk grep libidn make sed zip
|
||||
- make build stats index
|
||||
- mv dist public
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
only:
|
||||
- master
|
||||
|
||||
build:
|
||||
stage: build
|
||||
script:
|
||||
- make build stats index
|
||||
artifacts:
|
||||
expire_in: 1 week
|
||||
paths:
|
||||
- dist/
|
||||
|
||||
deploy:
|
||||
stage: deploy
|
||||
script:
|
||||
- npm install -g firebase-tools
|
||||
- firebase deploy --message "Pipeline ${CI_PIPELINE_ID}, job ${CI_JOB_ID}" --token "${FIREBASE_TOKEN}"
|
||||
only:
|
||||
- master
|
||||
|
|
|
|||
36
firebase.json
Normal file
36
firebase.json
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
"hosting": {
|
||||
"public": "dist",
|
||||
"headers": [{
|
||||
"source": "**",
|
||||
"headers": [{
|
||||
"key": "Content-Security-Policy",
|
||||
"value": "default-src 'none'; style-src 'unsafe-inline'; img-src data:;"
|
||||
}, {
|
||||
"key": "X-XSS-Protection",
|
||||
"value": "1;mode=block"
|
||||
}, {
|
||||
"key": "X-Frame-Options",
|
||||
"value": "SAMEORIGIN"
|
||||
}]
|
||||
}, {
|
||||
"source": "**/@(*.txt|hosts)",
|
||||
"headers": [{
|
||||
"key": "Content-Type",
|
||||
"value": "text/plain; charset=utf-8"
|
||||
}]
|
||||
}, {
|
||||
"source": "**/*.zip",
|
||||
"headers": [{
|
||||
"key": "Content-Type",
|
||||
"value": "application/zip"
|
||||
}]
|
||||
}, {
|
||||
"source": "**/*.gz",
|
||||
"headers": [{
|
||||
"key": "Content-Type",
|
||||
"value": "application/gzip"
|
||||
}]
|
||||
}]
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue