Skip to content

Commit

Permalink
firebase and github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasferreiralimax committed Oct 25, 2024
1 parent 014010f commit 004265e
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "voicecapture-vue"
}
}
20 changes: 20 additions & 0 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on merge
on:
push:
branches:
- main
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci && npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_VOICECAPTURE_VUE }}
channelId: live
projectId: voicecapture-vue
21 changes: 21 additions & 0 deletions .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# 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
permissions:
checks: write
contents: read
pull-requests: write
jobs:
build_and_preview:
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci && npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_VOICECAPTURE_VUE }}
projectId: voicecapture-vue
16 changes: 16 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"hosting": {
"public": "dist",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup>
import Nucleus from 'nucleus-vue';
import VoiceCaptureVue from './main-voicecapture';
import VoiceCaptureVue from './components/VoiceCapture.vue';
import { configApp } from './App.config';
</script>

Expand Down
4 changes: 2 additions & 2 deletions vite-module.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export default defineConfig({
],
build: {
lib: {
entry: resolve(__dirname, 'src/main-darkmode.js'),
name: 'VoiceCaptureVue',
entry: resolve(__dirname, 'src/main-voicecapture.js'),
name: 'VoiceCapture',
// the proper extensions will be added
fileName: 'voicecapture-vue'
},
Expand Down

0 comments on commit 004265e

Please sign in to comment.