Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

ci: add script to deploy via sst script

Brad Barbin189a8d72f90d
diff --git a/.github/workflows/docker.yml b/.github/workflows/deploy.yml
similarity index 68%
rename from .github/workflows/docker.yml
rename to .github/workflows/deploy.yml
index 3110a73a13..9807f61357 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/deploy.yml
@@ -1,4 +1,4 @@
-name: Build and Publish Docker Images
+name: Deploy Apps
on:
push:
@@ -14,7 +14,7 @@ env:
AWS_REGION: us-gov-east-1
jobs:
- build-and-publish:
+ build:
runs-on: ubuntu-latest
strategy:
matrix:
@@ -50,3 +50,28 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64
+
+ deploy:
+ name: Deploy Infrastructure
+ runs-on: ubuntu-latest
+ needs: build
+
+ env:
+ SUPABASE_ACCESS_TOKEN: ${{ secrets.SUPABASE_ACCESS_TOKEN }}
+ SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.SUPABASE_SERVICE_ROLE }}
+ SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - uses: actions/setup-node@v3
+ with:
+ node-version: "20"
+
+ - name: Install dependencies
+ run: |
+ npm install
+ npm install --prefix ci
+
+ - name: Run deployment
+ run: npm run -w ci ci:deploy
diff --git a/package.json b/package.json
index 019c094820..823a7885ea 100755
--- a/package.json
+++ b/package.json
@@ -30,6 +30,7 @@
"build:app": "turbo run build --filter=!www",
"build:packages": "turbo run build --filter=./packages/*",
"ci:migrations": "npm run -w ci ci:migrations",
+ "ci:deploy": "npm run -w ci ci:deploy",
"clean": "turbo run clean && rimraf ./node_modules && rimraf ./package-lock.json",
"db:build": "run-s db:kill db:start setup",
"db:function:new": "npm run db:function:new -w @carbon/database",