chore(nx): update #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |