Skip to content

explorer: v2.2.0

explorer: v2.2.0 #6

name: Release Events (Developer)
on:
release:
types:
- published
workflow_dispatch:
defaults:
run:
working-directory: src/developer
permissions:
contents: write
id-token: write
pull-requests: write
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
deploy-firebase-dev:
name: 🚀 Deploy to Firebase (dev)
if: ${{ startsWith(github.ref, 'refs/tags/developer') }}
runs-on: ubuntu-latest
environment:
name: dev
steps:
- name: ⬇️ Set up code
uses: actions/checkout@v4
with:
show-progress: false
- name: ⎔ Setup Node.js
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: npm
cache-dependency-path: src/developer/package-lock.json
- name: 📥 Download dependencies
shell: bash
run: npm ci
- name: 🏗 Run build command
shell: bash
run: npm run build
env:
VITE_FIREBASE_API_KEY: ${{ secrets.VITE_FIREBASE_API_KEY }}
VITE_FIREBASE_APP_ID: ${{ secrets.VITE_FIREBASE_APP_ID }}
VITE_FIREBASE_AUTH_DOMAIN: ${{ secrets.VITE_FIREBASE_AUTH_DOMAIN }}
VITE_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.VITE_FIREBASE_MESSAGING_SENDER_ID }}
VITE_FIREBASE_PROJECT_ID: ${{ secrets.VITE_FIREBASE_PROJECT_ID }}
VITE_FIREBASE_STORAGE_BUCKET: ${{ secrets.VITE_FIREBASE_STORAGE_BUCKET }}
- name: 🔢 Get firebase version
id: cache-settings
run: |
echo "firebase-tools=$(npm list -s --depth=0 | grep firebase-tools | tail -n 1 | sed 's/.*@//g')" >> GITHUB_OUTPUT
- name: 🪣 Cache firebase
uses: actions/cache@v3
with:
path: ~/.cache/firebase
key: ${{ runner.os }}-firebase-${{ steps.cache-settings.outputs.firebase-tools }}
- name: 🗝️ Authenticate to Google Cloud
id: auth
uses: google-github-actions/auth@v1
with:
access_token_scopes: "email, openid, https://www.googleapis.com/auth/cloud-platform, https://www.googleapis.com/auth/firebase"
workload_identity_provider: ${{ secrets.IDENTITY_PROVIDER }}
service_account: ${{ secrets.SERVICE_ACCOUNT_EMAIL }}
create_credentials_file: true
- name: 🚀 Firebase deploy
shell: bash
run: npx firebase-tools deploy --project ${{ secrets.PROJECT_ID }}