Skip to content

Merge pull request #16 from oidacra/add-pr-template #11

Merge pull request #16 from oidacra/add-pr-template

Merge pull request #16 from oidacra/add-pr-template #11

name: Deploy to Firebase Hosting on merge
on: # when does the workflow run?
push:
branches:
- main
env:
HUSKY: 0 # Disable Husky hooks
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4 # Checkout the repository at the latest commit
with:
fetch-depth: 0 # Fetch all history for all branches so that nx affected can compare against all commits
- name: Setup Node.js
uses: actions/setup-node@v3 # Cache node_modules to speed up builds
with:
node-version: 18 # Use the version 18 of Node.js
cache: 'yarn' # Cache node_modules to speed up builds
- name: Install Dependencies
run: yarn install --frozen-lockfile # Install dependencies using yarn with a frozen lockfile
- name: Run Build App
run: npx nx build series-workspace #build the app
- name: Deploy to Firebase Hosting Preview Channel
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_SERIES_V1_DB }}'
channelId: live # Deploy to live channel
projectId: series-v1-db