The following Google APIs are utilised by this project and need to be enabled for it to work (not including the APIs that the Firebase CLI will handle automatically):
- Maps JavaScript API
- Maps Geocoding API
- Manually enable Firebase Storage
- Manually enable login services
# Install dependencies
npm i
# Select project
npx firebase use staging
# Deploy everything (Frontend would need to be built first)
npx firebase deploy
$GOOGLE_MAPS_API_KEY
Requires the above environment variables to be set.
cd app
# Install dependencies
npm i
# Build app
npx webpack --env branch=staging
# Watch for changes
npx webpack --watch --env branch=staging
# Firebase actions back in root..
cd ..
# Run local server
npx firebase serve
# Deploy
npx firebase deploy --only hosting
# Deploy
npx firebase deploy --only database
# Deploy
npx firebase deploy --only storage
googlemaps.key
Requires the above config variables to be set, i.e. via
npx firebase functions:config:set googlemaps.key=...
.
cd functions
# Install dependencies
npm i
# Firebase actions back in root..
cd ..
# Running functions locally has not been successfully tested yet ;(
# Deploy
npx firebase deploy --only functions
# View config
less .github/workflows/{main,staging}-build-deploy.yml
# Code, commit, push, debug, repeat
# main and staging branches supported