Skip to content

update ml job

update ml job #38

Workflow file for this run

name: Build
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}
cancel-in-progress: true
permissions:
checks: write
contents: read
pull-requests: write
jobs:
build:
name: Build site
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- run: bun install --frozen-lockfile
- name: Cache imagetools directory
uses: actions/cache@v4
with:
path: ./node_modules/.cache/imagetools
key: imagetools-${{ hashFiles('**/*.png', '**/*.jpg', '**/*.jpeg', '**/*.gif') }}
restore-keys: |
imagetools-
- if: github.event_name != 'pull_request' && github.ref == 'refs/heads/master'
name: Build (production)
run: bun run build
env:
VITE_SHOPIFY_STOREFRONT_API_TOKEN: ${{ secrets.VITE_SHOPIFY_STOREFRONT_API_TOKEN }}
- if: github.event_name == 'pull_request' || github.ref != 'refs/heads/master'
name: Build (development)
run: bun run build
- name: Upload built project
uses: actions/upload-artifact@v4
with:
path: ./build
overwrite: true
retention-days: 1
name: build-artifacts-${{ github.run_id }}
- name: Deploy to prod
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_COMMA_WEB }}
channelId: live
projectId: comma-web