Skip to content

Deploy to Firebase Hosting on merge to beta #34

Deploy to Firebase Hosting on merge to beta

Deploy to Firebase Hosting on merge to beta #34

name: Deploy to Firebase Hosting on merge to beta
on:
push:
branches:
- beta
jobs:
build_and_deploy:
runs-on: ubuntu-latest
environment: beta
env:
VITE_FIREBASE_API_KEY: ${{secrets.FIREBASE_API_KEY}}
VITE_FIREBASE_AUTH_DOMAIN: ${{secrets.FIREBASE_AUTH_DOMAIN}}
VITE_FIREBASE_DATABASE_URL: ${{secrets.FIREBASE_DATABASE_URL}}
VITE_FIREBASE_PROJECT_ID: ${{secrets.FIREBASE_PROJECT_ID}}
VITE_FIREBASE_STORAGE_BUCKET: ${{secrets.FIREBASE_STORAGE_BUCKET}}
VITE_FIREBASE_MESSAGING_SENDER_ID: ${{secrets.FIREBASE_MESSAGING_SENDER_ID}}
VITE_FIREBASE_VAPID_PUBLIC_KEY: ${{vars.FIREBASE_VAPID_PUBLIC_KEY}}
VITE_FIREBASE_APP_ID: ${{secrets.FIREBASE_APP_ID}}
VITE_FIREBASE_MEASUREMENT_ID: ${{secrets.FIREBASE_MEASUREMENT_ID}}
VITE_FIREBASE_APP_CHECK_PUBLIC_KEY: ${{vars.FIREBASE_APP_CHECK_PUBLIC_KEY}}
VITE_MAPBOX_ACCESS_TOKEN: ${{secrets.MAPBOX_ACCESS_TOKEN}}
VITE_THUNDERFOREST_API_KEY: ${{secrets.THUNDERFOREST_API_KEY}}
VITE_DIRECT_TRAIN_API_URLS: ${{secrets.DIRECT_TRAIN_API_URLS}}
VITE_DB_TRANSPORT_REST_API_URLS: ${{secrets.DB_TRANSPORT_REST_API_URLS}}
VITE_STATIC_ASSETS_BUCKET: https://storage.googleapis.com/wtmg-static
VITE_STRIPE_PUBLISHABLE_KEY: ${{secrets.STRIPE_PUBLISHABLE_KEY}}
VITE_STRIPE_PRICE_ID_REDUCED: ${{secrets.STRIPE_PRICE_ID_REDUCED}}
VITE_STRIPE_PRICE_ID_NORMAL: ${{secrets.STRIPE_PRICE_ID_NORMAL}}
VITE_STRIPE_PRICE_ID_SOLIDARITY: ${{secrets.STRIPE_PRICE_ID_SOLIDARITY}}
VITE_DISCOURSE_HOST: ${{vars.DISCOURSE_HOST}}
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/prepare-source
with:
credentials_json: ${{secrets.GCP_CREDENTIALS}}
- name: Build project
run: yarn run build:prod
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_WTMG_PRODUCTION }}'
channelId: live
projectId: wtmg-production
target: beta