Skip to content

Commit 7503d91

Browse files
authored
Dev 2 main (#21)
* V 3.0 (#20) * feat: error boundary * feat: add test env * fixed image picker * fix filters button; use notification component for error display * feat: update environment configuration for test environment and enhance layout version display * feat: cols selector in server-paginated-table * fix server-paginated-select * fix: update default sort order to undefined for column sorting * fix: correct type definition for thunkOptions in createSubscriptions * chore: update firebaseServiceAccount secret references to GCP_SA across deployment workflows * feat: add firebase service and auth * feat: docs * feat: demo bg jobs page to demonstrate firestore usage * feat: use createSubscriptions to subscribe and unsubscribe bg jobs * feat: firestore demonstration using bg-jobs * don't expose firebase api key * chore: restore firebase.service.ts with secure env variable * Update VITE_API_BASE_URL in .env.development * Add VITE_FIREBASE_API_KEY to environment variables in deployment workflows * fix: hid firebase auth errors from UI * fix: update production hosting target in .firebaserc
2 parents 4053ed5 + fc2fed2 commit 7503d91

51 files changed

Lines changed: 12380 additions & 5605 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.development

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
VITE_API_BASE_URL=https://be.starters.rayonstudios.com/api/v1
1+
VITE_API_BASE_URL=https://rayon-gcp-express-psql-starter-dev-227506371134.us-east1.run.app/api/v1
2+
# VITE_API_BASE_URL=http://localhost:3000/api/v1
23
VITE_ENV=dev
3-
VITE_HCAPTCHA_SITE_KEY=cd86c190-7a30-4042-9468-018cd91ef63c
4+
VITE_HCAPTCHA_SITE_KEY=cd86c190-7a30-4042-9468-018cd91ef63c
5+
VITE_FIREBASE_AUTH_ENABLED=true

.env.production

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
VITE_API_BASE_URL=https://be.starters.rayonstudios.com/api
1+
VITE_API_BASE_URL=https://be.starters.rayonstudios.com/api/v1
22
VITE_ENV=production
3-
VITE_HCAPTCHA_SITE_KEY=cd86c190-7a30-4042-9468-018cd91ef63c
3+
VITE_HCAPTCHA_SITE_KEY=cd86c190-7a30-4042-9468-018cd91ef63c
4+
VITE_FIREBASE_AUTH_ENABLED=true

.env.test

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
VITE_API_BASE_URL=https://rayon-gcp-express-psql-starter-test-227506371134.us-east1.run.app/api/v1
2+
# VITE_API_BASE_URL=http://localhost:3000/api/v1
3+
VITE_ENV=test
4+
VITE_HCAPTCHA_SITE_KEY=cd86c190-7a30-4042-9468-018cd91ef63c
5+
VITE_FIREBASE_AUTH_ENABLED=true

.firebaserc

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,12 @@
44
"hosting": {
55
"prod": [
66
"rayon-gcp-starter"
7-
]
8-
}
9-
},
10-
"rayon-gcp-starter": {
11-
"hosting": {
12-
"dev": [
13-
"rayon-gcp-starter"
147
],
15-
"prod": [
16-
"rayon-gcp-starter"
8+
"test": [
9+
"rayon-gcp-starter-test"
10+
],
11+
"dev": [
12+
"rayon-gcp-starter-dev"
1713
]
1814
}
1915
}

.github/workflows/dev-deploy.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@v3
1414

15-
- run: yarn install --frozen-lockfile && npm run build:dev
15+
- run: npm ci && npm run build:dev
1616
env:
1717
CI: false
18+
VITE_FIREBASE_API_KEY: "${{ secrets.VITE_FIREBASE_API_KEY }}"
1819

1920
- uses: FirebaseExtended/action-hosting-deploy@v0
2021
with:
2122
repoToken: "${{ secrets.GITHUB_TOKEN }}"
22-
firebaseServiceAccount: "${{ secrets.SECRETJSON_DEV }}"
23+
firebaseServiceAccount: "${{ secrets.GCP_SA }}"
2324
channelId: live
2425
projectId: rayon-gcp-starter
2526
target: dev

.github/workflows/pr-preview-dev.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@v3
1313

14-
- run: yarn install --frozen-lockfile && npm run build:dev
14+
- run: npm ci && npm run build:dev
1515
env:
1616
CI: false
17+
VITE_FIREBASE_API_KEY: "${{ secrets.VITE_FIREBASE_API_KEY }}"
1718

1819
- uses: FirebaseExtended/action-hosting-deploy@v0
1920
with:
2021
repoToken: "${{ secrets.GITHUB_TOKEN }}"
21-
firebaseServiceAccount: "${{ secrets.SECRETJSON_DEV }}"
22+
firebaseServiceAccount: "${{ secrets.GCP_SA }}"
2223
projectId: rayon-gcp-starter
2324
target: dev

.github/workflows/pr-preview-prod.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@v3
1313

14-
- run: yarn install --frozen-lockfile && npm run build:prod
14+
- run: npm ci && npm run build:prod
1515
env:
1616
CI: false
17+
VITE_FIREBASE_API_KEY: "${{ secrets.VITE_FIREBASE_API_KEY }}"
1718

1819
- uses: FirebaseExtended/action-hosting-deploy@v0
1920
with:
2021
repoToken: "${{ secrets.GITHUB_TOKEN }}"
21-
firebaseServiceAccount: "${{ secrets.SECRETJSON_PROD }}"
22+
firebaseServiceAccount: "${{ secrets.GCP_SA }}"
2223
projectId: rayon-gcp-starter
2324
target: prod

.github/workflows/prod-deploy.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@v3
1414

15-
- run: yarn install --frozen-lockfile && npm run build:dev
15+
- run: npm ci && npm run build:prod
1616
env:
1717
CI: false
18+
VITE_FIREBASE_API_KEY: "${{ secrets.VITE_FIREBASE_API_KEY }}"
1819

1920
- uses: FirebaseExtended/action-hosting-deploy@v0
2021
with:
2122
repoToken: "${{ secrets.GITHUB_TOKEN }}"
22-
firebaseServiceAccount: "${{ secrets.SECRETJSON_PROD }}"
23+
firebaseServiceAccount: "${{ secrets.GCP_SA }}"
2324
channelId: live
2425
projectId: rayon-gcp-starter
2526
target: prod

.github/workflows/test-deploy.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Deploy to Firebase Hosting - Test
2+
"on":
3+
push:
4+
branches:
5+
- test
6+
workflow_dispatch:
7+
8+
jobs:
9+
build_and_deploy:
10+
permissions: write-all
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
15+
- run: npm ci && npm run build:test
16+
env:
17+
CI: false
18+
VITE_FIREBASE_API_KEY: "${{ secrets.VITE_FIREBASE_API_KEY }}"
19+
20+
- uses: FirebaseExtended/action-hosting-deploy@v0
21+
with:
22+
repoToken: "${{ secrets.GITHUB_TOKEN }}"
23+
firebaseServiceAccount: "${{ secrets.GCP_SA }}"
24+
channelId: live
25+
projectId: rayon-gcp-starter
26+
target: test

0 commit comments

Comments
 (0)