This repository has been archived by the owner on Dec 28, 2023. It is now read-only.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Firebase Continuous Deployment | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
name: build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
- name: Install Angular CLI | |
run: npm install -g @angular/cli | |
- name: Installing dependencies | |
working-directory: frontend/angular/xpose | |
run: npm install --legacy-peer-deps | |
- name: Run the Configuration Script | |
working-directory: frontend/angular/xpose/src/ | |
env: | |
FIREBASE_PROJECT_ID: ${{ secrets.FIREBASE_PROJECT_ID }} | |
FIREBASE_APP_ID: ${{ secrets.FIREBASE_APP_ID }} | |
FIREBASE_DATABASE_URL: ${{ secrets.FIREBASE_DATABASE_URL }} | |
FIREBASE_STORAGE_BUCKET: ${{ secrets.FIREBASE_STORAGE_BUCKET }} | |
FIREBASE_LOCATION_ID: ${{ secrets.FIREBASE_LOCATION_ID }} | |
FIREBASE_API_KEY: ${{ secrets.FIREBASE_API_KEY }} | |
FIREBASE_AUTH_DOMAIN: ${{ secrets.FIREBASE_AUTH_DOMAIN }} | |
FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.FIREBASE_MESSAGING_SENDER_ID }} | |
FIREBASE_MEASUREMENT_ID: ${{ secrets.FIREBASE_MEASUREMENT_ID }} | |
FIREBASE_VAPID_KEY: ${{ secrets.FIREBASE_VAPID_KEY }} | |
GOOGLE_MAPS_API_KEY: ${{ secrets.GOOGLE_MAPS_API_KEY }} | |
API_URL: ${{ secrets.API_URL }} | |
run: node config.index.js $FIREBASE_PROJECT_ID $FIREBASE_APP_ID $FIREBASE_DATABASE_URL $FIREBASE_STORAGE_BUCKET $FIREBASE_LOCATION_ID $FIREBASE_API_KEY $FIREBASE_AUTH_DOMAIN $FIREBASE_MESSAGING_SENDER_ID $FIREBASE_MEASUREMENT_ID $FIREBASE_VAPID_KEY $GOOGLE_MAPS_API_KEY $API_URL | |
- name: Building Project | |
working-directory: frontend/angular/xpose | |
run: npm run build | |
- uses: w9jds/firebase-action@master | |
with: | |
args: deploy --only hosting | |
env: | |
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} |