Skip to content

Instantly share code, notes, and snippets.

@mchampaneri
Last active November 1, 2020 13:27
Show Gist options
  • Save mchampaneri/2fc283daf4894a190d1db10a70698d78 to your computer and use it in GitHub Desktop.
Save mchampaneri/2fc283daf4894a190d1db10a70698d78 to your computer and use it in GitHub Desktop.
# Note:
#
# Only hosting and functions are getting deployed in this
# script you should only deploy whole firebase project,
# If you are maintaining local copy of indexes and rules.
#
# Assuming that you have functions folder in your roote folder.
#
# This pipe line reads credentials from the gitlab envrioment.
# https://docs.gitlab.com/ee/ci/variables/README.html#create-a-custom-variable-in-the-ui
image: node:latest
stages:
- release
test:
stage: release
before_script:
- npm install -g firebase-tools
- npm install ./functions
script:
- firebase use [your-project-name]
- firebase deploy --only hosting
- firebase deploy --only functions
environment: [envrioment from where to read the credentils]
only:
- [branch name which can trigger this pipeline]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment