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

[Feature] Workflows setup to deploy site for Live and Staging #226

Merged
merged 5 commits into from
Aug 27, 2023
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
6 changes: 4 additions & 2 deletions .github/workflows/deploy-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Deploy Preview
on: pull_request
jobs:
build_and_preview:
# To skip the workflow
if: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -16,5 +18,5 @@ jobs:
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
# See docs/tutorials/04-deploy.md for configuring these
projectId: hoverboard-master
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_HOVERBOARD_MASTER }}'
projectId: devfestahm-master
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_DEVFESTAHM_MASTER }}'
24 changes: 24 additions & 0 deletions .github/workflows/deploy-stage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Deploy Staging
on:
push:
branches:
- develop
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Create temp serviceAccount.json
run: echo "{}" > serviceAccount.json
- run: npm ci
- run: npm run build
- uses: w9jds/firebase-action@v2.2.2
with:
args: deploy
env:
# See docs/tutorials/04-deploy.md for configuring these
PROJECT_ID: devfestahm-develop
GCP_SA_KEY: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_DEVFESTAHM_DEVELOP }}
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ jobs:
args: deploy
env:
# See docs/tutorials/04-deploy.md for configuring these
PROJECT_ID: hoverboard-master
GCP_SA_KEY: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_HOVERBOARD_MASTER }}
PROJECT_ID: devfestahm-master
GCP_SA_KEY: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_DEVFESTAHM_MASTER }}
12 changes: 9 additions & 3 deletions firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,19 @@
"indexes": "firestore.indexes.json"
},
"functions": {
"predeploy": ["npm --prefix \"$RESOURCE_DIR\" run build"],
"predeploy": [
"npm --prefix \"$RESOURCE_DIR\" run build"
],
"source": "functions"
},
"hosting": {
"public": "dist",
"site": "devfestahm-develop",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"site": "devfestahm-master",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
Expand Down
Loading