Skip to content

Commit

Permalink
add action for pr and main deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
himanshurajora committed Jan 4, 2024
1 parent d941919 commit 6f63008
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Deploy to Firebase

on:
push:
branches:
- master
# paths:
# - "src/**"

jobs:
deploy_live_website:
runs-on: ubuntu-latest
steps:
- name: Checkout files
uses: actions/checkout@v4
- name: Use Node.js 12.10.0
uses: actions/setup-node@v3
with:
node-version: 12.10.0
cache: 'npm'
- run: npm i && npm run build
# now deploy to firebase
- name: Deploy site
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_TOKEN }}'
projectId: lookingforcontributors
channelId: live
24 changes: 24 additions & 0 deletions .github/workflows/pr-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Deploy to Firebase From PR

on:
pull_request:

jobs:
deploy_live_website:
runs-on: ubuntu-latest
steps:
- name: Checkout files
uses: actions/checkout@v4
- name: Use Node.js 12.10.0
uses: actions/setup-node@v3
with:
node-version: 12.10.0
cache: 'npm'
- run: npm i && npm run build
# now deploy to firebase
- name: Deploy site
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_TOKEN }}'
projectId: lookingforcontributors

0 comments on commit 6f63008

Please sign in to comment.