Skip to content

Commit

Permalink
ci: firebase hosting
Browse files Browse the repository at this point in the history
  • Loading branch information
aj3sh committed Aug 31, 2024
1 parent 28c6208 commit 3fa6f2b
Show file tree
Hide file tree
Showing 6 changed files with 1,431 additions and 106 deletions.
5 changes: 5 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "nepalitime-9c05b"
}
}
36 changes: 36 additions & 0 deletions .github/workflows/firebase-hosting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting

on:
push:
branches: ['main']
workflow_dispatch:

permissions:
checks: write
contents: read
pull-requests: write

jobs:
build_and_preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup node v20
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'

- name: Build
run: npm ci && npm run build

- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_NEPALITIME_9C05B }}
projectId: nepalitime-9c05b
channelId: 'main'
File renamed without changes.
13 changes: 13 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"hosting": {
"site": "nepalitime",
"public": "dist",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
Loading

0 comments on commit 3fa6f2b

Please sign in to comment.