Comments (2)
Hi, I got the same errors as you. Here it is my workflow:
name: Deploy to Firebase Hosting on merge
'on':
push:
branches:
- main
jobs:
build_and_deploy:
name: Build then deploy to Firebase Hosting
runs-on: ubuntu-latest
steps:
- name: Checkout Git Repo
uses: actions/checkout@v3
- name: Use Node.js 20.1.0
uses: actions/setup-node@v3
with:
node-version: 20.1.0
- name: npm install, build
run: |
npm install
npm run build
- name: Install Firebase CLI
run: |
npm install -g firebase-tools
firebase --version
- name: Deploy to Firebase
run: |
echo '${{secrets.FIREBASE_SERVICE_ACCOUNT}}' > $HOME/gcloud-service-key.json
export GOOGLE_APPLICATION_CREDENTIALS="$HOME/gcloud-service-key.json"
firebase deploy --only hosting
and if you are building a SPA, make sure that your firebase.json file look like this:
{
"hosting": {
"public": "dist/your-app-name",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"frameworksBackend": {
"region": "europe-west1"
},
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
from action-hosting-deploy.
Thank you @JuHue this solution helped me too with my Angular 17 app. I use your code up until & incl.
- name: Deploy to Firebase
Merge workflow now works.
Thank you @lisk8 for posting the issue - discussions like this help beginners like me.
from action-hosting-deploy.
Related Issues (20)
- [BUG] GitHub comment not appearing HOT 2
- [BUG] Github action does not find my project HOT 3
- [BUG] HOT 4
- [BUG] [vite-plugin-pwa:build] Cannot read properties of null (reading 'tagName') HOT 1
- Why not have a single deploy action?
- [BUG] HOT 2
- [BUG] [HttpError]: Resource not accessible by integration HOT 4
- [BUG] stream-json parse error
- [BUG] firebase-tools@13 (latest) now requires Node 18 or Node 20 HOT 5
- Are github environments relevant for making a preview channel deploys?
- [BUG] Cannot find module 'vite'
- Preview build fails with yarn
- Add a way to use different filename for firebase.json
- QUESTION: How to enable PR preview for forked PRs
- Node.js 16 actions are deprecated HOT 16
- [BUG] preview hosts are not being added to the authorized domains list HOT 6
- QUESTION: DO we have a way to pass env variables from Github Secrets inside this Actions via env attribute?
- [ENHANCEMENT] Disable auto-commenting to PR for matrix jobs HOT 1
- [BUG] Unexpected token r in JSON at position 2 HOT 1
- Release mismatches
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from action-hosting-deploy.