mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-09 15:07:55 -05:00
* added blacksmith optimizations to workflows and dockerfiles to enhance performance. please review before pushing to production * remove cache from and cache to directives from docker based actions, per blacksmith docs --------- Co-authored-by: Connor Mulholland <connormul@Connors-MacBook-Pro.local>
56 lines
1.4 KiB
YAML
56 lines
1.4 KiB
YAML
name: Trigger.dev Deploy
|
|
|
|
on:
|
|
workflow_call:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
deploy:
|
|
name: Deploy to Trigger.dev
|
|
runs-on: blacksmith-4vcpu-ubuntu-2404
|
|
concurrency:
|
|
group: trigger-deploy-${{ github.ref }}
|
|
cancel-in-progress: false
|
|
env:
|
|
TRIGGER_ACCESS_TOKEN: ${{ secrets.TRIGGER_ACCESS_TOKEN }}
|
|
TRIGGER_PROJECT_ID: ${{ secrets.TRIGGER_PROJECT_ID }}
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: latest
|
|
|
|
- name: Setup Bun
|
|
uses: oven-sh/setup-bun@v2
|
|
with:
|
|
bun-version: 1.2.22
|
|
|
|
- name: Cache Bun dependencies
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.bun/install/cache
|
|
node_modules
|
|
**/node_modules
|
|
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-bun-
|
|
|
|
- name: Install dependencies
|
|
run: bun install --frozen-lockfile
|
|
|
|
- name: Deploy to Trigger.dev (Staging)
|
|
if: github.ref == 'refs/heads/staging'
|
|
working-directory: ./apps/sim
|
|
run: npx --yes trigger.dev@4.0.4 deploy -e staging
|
|
|
|
- name: Deploy to Trigger.dev (Production)
|
|
if: github.ref == 'refs/heads/main'
|
|
working-directory: ./apps/sim
|
|
run: npx --yes trigger.dev@4.0.4 deploy
|
|
|