Skip to content

Commit

Permalink
Merge pull request #60 from disha1202/#20d6xcu
Browse files Browse the repository at this point in the history
Added firebase auto deployment configuration(#20d6xcu)
  • Loading branch information
adityasharma7 authored Apr 6, 2022
2 parents 566b2fe + 3d35cd9 commit 9d439be
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"projects": {
"default": "hotwax-digital-commerce",
"production": "digital-commerce-71eb8"
},
"targets": {
"hotwax-digital-commerce": {
"hosting": {
"dev-inventorycount": [
"dev-inventorycount"
]
}
},
"digital-commerce-71eb8": {
"hosting": {
"inventorycount": [
"inventorycount"
]
}
}
}
}
29 changes: 29 additions & 0 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on merge
'on':
push:
branches:
- main
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Dependencies
run: npm install
- name: Generate .env file
run: cp .env.example .env
- name: Build
run: npm run build
- name: Install Firebase
run: npm install -g firebase-tools
- name: Set Firebase project
run: firebase use default --token "$HOTWAX_PUBLIC_SECRET"
env:
HOTWAX_PUBLIC_SECRET: ${{ secrets.HOTWAX_PUBLIC_SECRET }}
- name: Deploy
run: firebase deploy --token "$HOTWAX_PUBLIC_SECRET" -m "Deploying via GitHub actions" --only hosting:dev-inventorycount
env:
HOTWAX_PUBLIC_SECRET: ${{ secrets.HOTWAX_PUBLIC_SECRET }}
6 changes: 6 additions & 0 deletions changelogs/unreleased/-20d6xcu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Added firebase auto deployment configuration
ticket_id: "#20d6xcu"
merge_request: 60
author: Disha
type: added
32 changes: 32 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"hosting": [
{
"target": "inventorycount",
"public": "dist",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [ {
"source": "**",
"destination": "/index.html"
} ]

},
{
"target": "dev-inventorycount",
"public": "dist",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [ {
"source": "**",
"destination": "/index.html"
} ]

}
]
}

0 comments on commit 9d439be

Please sign in to comment.