Fix Statistics Chart (#52) #21
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: Deploy to Firebase Hosting on merge | |
"on": | |
push: | |
branches: | |
- production | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
environment: production | |
env: | |
VITE_FIREBASE_API_KEY: "${{ secrets.API_KEY }}" | |
VITE_FIREBASE_AUTH_DOMAIN: "${{ secrets.AUTH_DOMAIN }}" | |
VITE_FIREBASE_DATBASE_URL: "${{ secrets.DATABASE_URL }}" | |
VITE_FIREBASE_PROJECT_ID: "${{ secrets.PROJECT_ID }}" | |
VITE_FIREBASE_STORAGE_BUCKET: "${{ secrets.STORAGE_BUCKET }}" | |
VITE_FIREBASE_MESSAGING_SENDER_ID: "${{ secrets.MESSAGING_SENDER_ID }}" | |
VITE_FIREBASE_APP_ID: "${{ secrets.APP_ID }}" | |
VITE_FIREBASE_MEASUREMENT_ID: "${{ secrets.MEASUREMENT_ID }}" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
- name: Install Dependencies | |
run: yarn install --frozen-lockfile | |
- name: Create Production Build | |
run: yarn build | |
- name: Archive Production Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: production | |
path: build | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
- name: Install Dependencies | |
run: yarn install --frozen-lockfile | |
- name: Lint | |
run: yarn lint | |
deploy_production: | |
needs: [build, lint] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Download Artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: production | |
path: build | |
- uses: FirebaseExtended/action-hosting-deploy@v0 | |
with: | |
target: production | |
repoToken: "${{ secrets.GITHUB_TOKEN }}" | |
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_CRUZHACKS_4A899 }}" | |
channelId: live | |
projectId: cruzhacks-4a899 |