Skip to content

Update setup-environment.yml #30

Update setup-environment.yml

Update setup-environment.yml #30

Workflow file for this run

name: Deploy to Firebase Hosting
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install Firebase CLI
run: npm install -g firebase-tools
- name: Ensure firebase.json exists
run: |
if [ ! -f firebase.json ]; then
echo '{
"hosting": {
"public": "public",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}' > firebase.json
fi
- name: Deploy to Firebase Hosting
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
run: firebase deploy --only hosting