How to setup a production-ready Devops environment for React without a penny — Part 3

Step 1: Setup project in firebase

Step 2: Setup multiple project in your codebase

{
"projects": {
"prd": "abc",
"stg": "abc-staging"
}
}

Step 3: Update your CICD pipeline

staging-hosting:
stage: deploy
script:
- firebase deploy --only hosting --token $FIREBASE_TOKEN
only:
- branch_staging

dependencies:
- staging-build
prod-hosting:
stage: deploy
script:
- firebase deploy --only hosting --token $FIREBASE_TOKEN
only:
- master

dependencies:
- prod-build

Step 4: Update your deployment script

prod-hosting:
...
script:
- firebase deploy -P prd --only hosting --token $FIREBASE_TOKEN
staging-hosting:
...
script:
- firebase deploy -P stg --only hosting --token $FIREBASE_TOKEN

Final Words

--

--

--

I am a full stack developer, mainly focus on Nodejs/React.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Pretzel Weekly Update #10 — The “What Was That Song???” Edition

Install a Debian Server

Run Selenium in Docker on Google Cloud Build

Steps to Dokku and Postgres (with PostGIS) on Ubuntu 16.04

A way to locally monitor Docker Container network in real-time with Wireshark

Tellor Update April 10th 2022

SASS( Systematically Awesome Style Sheets)😎

A Hacker’s Guide to Programming Microcontrollers

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Terrence W

Terrence W

I am a full stack developer, mainly focus on Nodejs/React.

More from Medium

Understanding Different Exchanges of RabbitMQ

Headfull Puppeter running in docker without GUI

The merchant list problem: caching frequently-changing aggregate data.

Creating OpenAPI specifications with Jargon