Skip to content

Commit

Permalink
Firebase merge hook
Browse files Browse the repository at this point in the history
  • Loading branch information
szram-co committed Jan 5, 2024
1 parent dc1a8f0 commit dd9b9ad
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 32 deletions.
18 changes: 3 additions & 15 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
{
"projects": {
"live": "resume-szram-co",
"default": "resume-szram-co",
"staging": "resume-szram-co"
},
"targets": {
"resume-szram-co": {
"hosting": {
"live": [
"resume-szram-co"
]
}
}
},
"etags": {}
}
"default": "resume-szram-co"
}
}
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on PR
'on': pull_request
name: Deploy to Firebase Hosting on merge
'on':
push:
branches:
- main
jobs:
build_and_preview:
if: '${{ github.event.pull_request.head.repo.full_name == github.repository }}'
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# - run: npm ci && npm run build
- uses: actions/setup-node@v2
with:
node-version: '20'
- run: npm ci && npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_RESUME_SZRAM_CO }}'
channelId: live
projectId: resume-szram-co
17 changes: 6 additions & 11 deletions firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,11 @@
"hosting": {
"public": "dist",
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"],
"cleanUrls": true,
"trailingSlash": false
},
"emulators": {
"hosting": {
"port": 5000
},
"ui": {
"enabled": true
},
"singleProjectMode": true
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"format": "prettier --write src/",
"preview": "vite preview --host",
"start": "vite --host",
"type-check": "vue-tsc --noEmit -p tsconfig.app.json --composite false"
"type-check": "vue-tsc --noEmit -p tsconfig.app.json --composite false",
"deploy": "npm run build && firebase deploy"
},
"dependencies": {
"@vueuse/core": "^10.7.1",
Expand Down

0 comments on commit dd9b9ad

Please sign in to comment.