-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into bugfix/parth4apple/navbar2
- Loading branch information
Showing
24 changed files
with
375 additions
and
157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"projects": { | ||
"default": "pia-dev-60cea" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Build and Deploy | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
environment: | ||
required: true | ||
type: string | ||
firebaseProjectId: | ||
required: true | ||
type: string | ||
firebaseHostingChannelId: | ||
required: false | ||
type: string | ||
|
||
jobs: | ||
build_and_preview: | ||
name: Build and Deploy | ||
runs-on: ubuntu-latest | ||
environment: ${{ inputs.environment }} | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
- name: Create Frontend .env | ||
run: | | ||
cd frontend | ||
touch .env | ||
echo FIREBASE_CONFIG=${{ secrets.FIREBASE_CONFIG }} >> .env | ||
- name: Create Backend .env | ||
run: | | ||
cd backend | ||
touch .env | ||
echo MONGO_URI=${{ secrets.MONGO_URI }} >> .env | ||
echo SERVICE_ACCOUNT_KEY=${{ secrets.SERVICE_ACCOUNT_KEY }} >> .env | ||
echo APP_PORT=${{ secrets.APP_PORT }} >> .env | ||
- name: Build Frontend | ||
run: cd frontend && npm ci && npm run build | ||
- name: Build Backend | ||
run: | | ||
cd backend | ||
npm run build | ||
- name: Deploy to Firebase | ||
uses: FirebaseExtended/action-hosting-deploy@v0 | ||
with: | ||
repoToken: "${{ secrets.GITHUB_TOKEN }}" | ||
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_PIA_DEV_60CEA }}" | ||
projectId: ${{ inputs.firebaseProjectId }} | ||
channelId: ${{ inputs.firebaseHostingChannelId }} | ||
env: | ||
FIREBASE_CLI_EXPERIMENTS: pintags |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Deploy Branch Preview | ||
on: | ||
pull_request: | ||
|
||
jobs: | ||
deploy_preview: | ||
name: Deploy Branch Preview | ||
if: "${{ github.event.pull_request.head.repo.full_name == github.repository }}" | ||
uses: ./.github/workflows/build-and-deploy.yml | ||
with: | ||
environment: Preview | ||
firebaseProjectId: pia-dev-60cea | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Deploy to Staging | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
deploy_staging: | ||
name: Deploy to Staging | ||
uses: ./.github/workflows/build-and-deploy.yml | ||
with: | ||
environment: Staging | ||
firebaseProjectId: pia-dev-60cea | ||
firebaseHostingChannelId: live | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,3 +128,6 @@ dist | |
.yarn/build-state.yml | ||
.yarn/install-state.gz | ||
.pnp.* | ||
|
||
# Firebase | ||
.firebase |
Oops, something went wrong.