From 5ab26887d9b880c37710bb6b5f0fc81749fdc20a Mon Sep 17 00:00:00 2001 From: thilo Date: Sat, 21 Mar 2020 17:07:18 +0100 Subject: [PATCH] added firebase hosting --- .firebaserc | 5 +++++ .gitlab-ci.yml | 19 +++++++++++++++++++ firebase.json | 16 ++++++++++++++++ 3 files changed, 40 insertions(+) create mode 100644 .firebaserc create mode 100644 .gitlab-ci.yml create mode 100644 firebase.json diff --git a/.firebaserc b/.firebaserc new file mode 100644 index 0000000..1f6896c --- /dev/null +++ b/.firebaserc @@ -0,0 +1,5 @@ +{ + "projects": { + "default": "avian-safeguard-214619" + } +} diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..2fa9d42 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,19 @@ +image: rambabusaravanan/firebase + +stages: + - deploy + +cache: + paths: + - node_modules/ + key: "$CI_BUILD_REPO" + +deploy-prod: + stage: deploy + only: + - master + script: + - yarn + - yarn run build + - firebase use avian-safeguard-214619 --token $FIREBASE_TOKEN + - firebase deploy --only hosting -m "Pipe $CI_PIPELINE_ID Build $CI_BUILD_ID" --token $FIREBASE_TOKEN diff --git a/firebase.json b/firebase.json new file mode 100644 index 0000000..2c33c29 --- /dev/null +++ b/firebase.json @@ -0,0 +1,16 @@ +{ + "hosting": { + "public": "dist", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ], + "rewrites": [ + { + "source": "**", + "destination": "/index.html" + } + ] + } +}