Skip to content

Merge branch 'dev' of https://github.com/maranmaran/BraveSnouts into dev #334

Merge branch 'dev' of https://github.com/maranmaran/BraveSnouts into dev

Merge branch 'dev' of https://github.com/maranmaran/BraveSnouts into dev #334

Workflow file for this run

# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools
name: Deploy to Development
"on":
workflow_dispatch:
push:
branches:
- dev
jobs:
hosting:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./src/brave-snouts-frontend
steps:
- uses: actions/checkout@v2
- run: npm run build:dev
env:
BASE_URL: ${{ secrets.BASE_URL_DEV }}
FIREBASE_API_KEY: ${{ secrets.FIREBASE_API_KEY_DEV }}
FIREBASE_AUTH_DOMAIN: ${{ secrets.FIREBASE_AUTH_DOMAIN_DEV }}
FIREBASE_PROJECT_ID: ${{ secrets.FIREBASE_PROJECT_ID_DEV }}
FIREBASE_STORAGE_BUCKET: ${{ secrets.FIREBASE_STORAGE_BUCKET_DEV }}
FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.FIREBASE_MESSAGING_SENDER_ID_DEV }}
FIREBASE_APP_ID: ${{ secrets.FIREBASE_APP_ID_DEV }}
FIREBASE_MEASUREMENT_ID: ${{ secrets.FIREBASE_MEASUREMENT_ID_DEV }}
CACHE_SEED: ${{ secrets.CACHE_SEED }}
# CONTENTFUL_SPACE: ${{ secrets.CONTENTFUL_SPACE_DEV }}
# CONTENTFUL_API_KEY: ${{ secrets.CONTENTFUL_API_KEY_DEV }}
# CONTENTFUL_PREVIEW_API_KEY: ${{ secrets.CONTENTFUL_PREVIEW_API_KEY_DEV }}
# STRIPE_PUBLISHABLE_KEY: ${{ secrets.STRIPE_PUBLISHABLE_KEY_DEV }}
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
entrypoint: ./src
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_BRAVESNOUTSDEV }}"
channelId: live
projectId: bravesnoutsdev #firebaserc
env:
FIREBASE_CLI_PREVIEWS: hostingchannels
functions:
runs-on: ubuntu-latest
env:
FIREBASE_EMULATORS_PATH: ${{ github.workspace }}/emulator-cache
defaults:
run:
working-directory: ./src/functions
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: actions/setup-java@v3
with:
java-version: 20
distribution: "zulu"
- name: Cache firebase emulators
uses: actions/cache@v4
with:
path: ${{ env.FIREBASE_EMULATORS_PATH }}
key: ${{ runner.os }}-firebase-emulators-${{
hashFiles('emulator-cache/**') }}
continue-on-error: true
- uses: w9jds/setup-firebase@main
with:
firebase_token: ${{ secrets.FIREBASE_CI_TOKEN_DEV }}
- run: npm ci
- run: npm run test:emulators
env:
CLOUD_RUNTIME_CONFIG: "test/test-assets/.runtimeconfig.test.json"
GCLOUD_PROJECT: "bravesnoutstest"
FIREBASE_STORAGE_BUCKET: "bravesnoutstest.appspot.com"
FIREBASE_HOSTING_EMULATOR_HOST: "127.0.0.1:5000"
FIREBASE_FUNCTIONS_EMULATOR_HOST: "127.0.0.1:5001"
FIRESTORE_EMULATOR_HOST: "127.0.0.1:8080"
FIREBASE_PUBSUB_EMULATOR_HOST: "127.0.0.1:8085"
FIREBASE_DATABASE_EMULATOR_HOST: "127.0.0.1:9000"
FIREBASE_STORAGE_EMULATOR_HOST: "127.0.0.1:9199"
FIREBASE_AUTH_EMULATOR_HOST: "127.0.0.1:9099"
- uses: w9jds/firebase-action@master
with:
args: deploy --only functions --project dev
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_CI_TOKEN_DEV }}
PROJECT_PATH: "./src/functions"