Skip to content

Merge pull request #220 from BizziQuest/153-display-notice-to-users-o… #87

Merge pull request #220 from BizziQuest/153-display-notice-to-users-o…

Merge pull request #220 from BizziQuest/153-display-notice-to-users-o… #87

Workflow file for this run

name: Deploy to Firebase Hosting
on:
push:
branches: [ main ]
env:
CI: true
VITE_APP_FIREBASE_PROJECT_ID: ${{ secrets.VITE_APP_FIREBASE_PROJECT_ID }}
VITE_APP_FIREBASE_API_KEY: ${{ secrets.VITE_APP_FIREBASE_API_KEY }}
VITE_APP_FIREBASE_AUTH_DOMAIN: ${{ secrets.VITE_APP_FIREBASE_AUTH_DOMAIN }}
VITE_APP_FIREBASE_DATABASE_URL: ${{ secrets.VITE_APP_FIREBASE_DATABASE_URL }}
VITE_APP_FIREBASE_STORAGE_BUCKET: ${{ secrets.VITE_APP_FIREBASE_STORAGE_BUCKET }}
VITE_APP_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.VITE_APP_FIREBASE_MESSAGING_SENDER_ID }}
VITE_APP_FIREBASE_APP_ID: ${{ secrets.VITE_APP_FIREBASE_APP_ID }}
VITE_APP_GOOGLE_ANALYTICS_ID: ${{ secrets.VITE_APP_GOOGLE_ANALYTICS_ID }}
VITE_APP_RECAPTCHA_SITE_KEY: ${{ secrets.VITE_APP_RECAPTCHA_SITE_KEY }}
VITE_APP_ALGOLIA_API_KEY: ${{ secrets.VITE_APP_ALGOLIA_API_KEY }}
VITE_APP_ALGOLIA_APP_ID: ${{ secrets.VITE_APP_ALGOLIA_APP_ID }}
VITE_APP_ALGOLIA_INDEX_NAME: ${{ secrets.VITE_APP_ALGOLIA_INDEX_NAME }}
VITE_APP_I18N_LOCALE: en
VITE_APP_I18N_FALLBACK_LOCALE: en
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}
jobs:
linting:
name: Run Linter
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 7
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install Global Dependencies
run: npm install -g pnpm
- name: Install Local Dependencies
run: pnpm install
- name: Build
run: pnpm build
- name: Archive Production Artifact
uses: actions/upload-artifact@master
with:
name: dist
path: dist
deploy:
name: Deploy to https://questlists.web.app
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x] # only use 10, for firebase-tools compatibility
env:
NODE_ENV: production
CI: false
VITE_APP_FIREBASE_DATABASE_URL: ${{ secrets.PROD_VITE_APP_FIREBASE_DATABASE_URL }}
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
VITE_APP_RECAPTCHA_SITE_KEY: ${{ secrets.VITE_APP_RECAPTCHA_SITE_KEY }}
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 7
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Authenticate with GCP
run: |
echo ${GCP_SA_KEY} > ${HOME}/gcp-sa.json
export GOOGLE_APPLICATION_CREDENTIALS=${HOME}/gcp-sa.json
sudo apt-get install google-cloud-sdk -y
gcloud auth activate-service-account --key-file=${HOME}/gcp-sa.json
- run: pnpm install --production=false
- run: pnpm makeIcons && pnpm build
# - name: Deploy to Firebase
# uses: w9jds/firebase-action@master
# with:
# args: deploy
- name: Deploy to Firebase Hosting
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_QUESTLISTS }}'
channelId: live
projectId: questlists