Skip to content

Merge pull request #10 from MILO-ML/bug/fix-cd-issues #1

Merge pull request #10 from MILO-ML/bug/fix-cd-issues

Merge pull request #10 from MILO-ML/bug/fix-cd-issues #1

# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools
name: Deploy to Firebase Hosting on merge
on:
push:
branches:
- master
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '5.x'
- name: Run GitVersion
id: gitversion
uses: gittools/actions/gitversion/[email protected]
with:
useConfigFile: false
- name: Update package version
run: |
sed -i.bak "s|\"version\": \"[0-9\.]*\"|\"version\": \"${{ steps.gitversion.outputs.semVer }}\"|" package.json
- name: Cache UI Dependencies
id: cache_ui
uses: actions/cache@v4
with:
path: ui/node_modules
key: ${{ runner.os }}-ui-${{ hashFiles('ui/package-lock.json') }}
restore-keys: |
${{ runner.os }}-ui-
- name: Install UI dependencies
if: steps.cache_ui.outputs.cache-hit != 'true'
run: npm --prefix ui install
- name: Build AutoML UI
run: npm --prefix ui run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_MILO_ML }}
channelId: live
projectId: milo-ml