Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added firebase auto deployment configuration(#20d6xcu) #60

Merged
merged 7 commits into from
Apr 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
} ]

}
]
}