Skip to main content

Firebase

Angular

  • Fireship YouTube video
  • Create empty firebase app in website
  • Install firebase-tools from npm
  • Login firebase login
  • Build project for production ng build --aot --prod
  • Initialize firebase app firebase init
  • Select Hosting
  • public directory: dist/[project_name]
  • Configure as single page app: y

React

  • Create empty firebase app in website
  • Install firebase-tools from npm
  • Login firebase login
  • Build project for production npm run build
  • Initialize firebase app firebase init
  • Select Hosting
  • public directory: build
  • Configure as single page app: y

GitLab CI

Get Firebase token

  • npm install firebase-tools
  • firebase login: ci
  • Login to get TOKEN
  • Add token as environment variable (FIREBASE_TOKEN) in GitLab CI

Create firebase files

  • Initialize firebase app firebase init
  • Select Hosting
  • public directory: build
  • Configure as single page app: y

.gitlab-ci.yml