diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
deleted file mode 100644
index 30d2eb2608..0000000000
--- a/.github/workflows/build.yml
+++ /dev/null
@@ -1,151 +0,0 @@
-name: Build and Publish Docker Image
-
-on:
- push:
- branches: [main, staging]
-
-jobs:
- build-and-push:
- strategy:
- fail-fast: false
- matrix:
- include:
- # AMD64 builds on x86 runners
- - dockerfile: ./docker/app.Dockerfile
- image: ghcr.io/simstudioai/simstudio
- platform: linux/amd64
- arch: amd64
- runner: linux-x64-8-core
- - dockerfile: ./docker/db.Dockerfile
- image: ghcr.io/simstudioai/migrations
- platform: linux/amd64
- arch: amd64
- runner: linux-x64-8-core
- - dockerfile: ./docker/realtime.Dockerfile
- image: ghcr.io/simstudioai/realtime
- platform: linux/amd64
- arch: amd64
- runner: linux-x64-8-core
- # ARM64 builds on native ARM64 runners
- - dockerfile: ./docker/app.Dockerfile
- image: ghcr.io/simstudioai/simstudio
- platform: linux/arm64
- arch: arm64
- runner: linux-arm64-8-core
- - dockerfile: ./docker/db.Dockerfile
- image: ghcr.io/simstudioai/migrations
- platform: linux/arm64
- arch: arm64
- runner: linux-arm64-8-core
- - dockerfile: ./docker/realtime.Dockerfile
- image: ghcr.io/simstudioai/realtime
- platform: linux/arm64
- arch: arm64
- runner: linux-arm64-8-core
- runs-on: ${{ matrix.runner }}
- permissions:
- contents: read
- packages: write
-
- steps:
- - name: Checkout repository
- uses: actions/checkout@v4
-
- - name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v3
-
- - name: Log in to the Container registry
- if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
- uses: docker/login-action@v3
- with:
- registry: ghcr.io
- username: ${{ github.repository_owner }}
- password: ${{ secrets.GITHUB_TOKEN }}
-
- - name: Extract metadata (tags, labels) for Docker
- id: meta
- uses: docker/metadata-action@v5
- with:
- images: ${{ matrix.image }}
- tags: |
- type=raw,value=latest-${{ matrix.arch }},enable=${{ github.ref == 'refs/heads/main' }}
- type=raw,value=staging-${{ github.sha }}-${{ matrix.arch }},enable=${{ github.ref == 'refs/heads/staging' }}
- type=sha,format=long,suffix=-${{ matrix.arch }}
-
- - name: Build and push Docker image
- uses: docker/build-push-action@v6
- with:
- context: .
- file: ${{ matrix.dockerfile }}
- platforms: ${{ matrix.platform }}
- push: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/main' }}
- tags: ${{ steps.meta.outputs.tags }}
- labels: ${{ steps.meta.outputs.labels }}
- cache-from: type=gha,scope=build-v3
- cache-to: type=gha,mode=max,scope=build-v3
- provenance: false
- sbom: false
-
- create-manifests:
- runs-on: ubuntu-latest
- needs: build-and-push
- if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
- strategy:
- matrix:
- include:
- - image: ghcr.io/simstudioai/simstudio
- - image: ghcr.io/simstudioai/migrations
- - image: ghcr.io/simstudioai/realtime
- permissions:
- contents: read
- packages: write
-
- steps:
- - name: Log in to the Container registry
- uses: docker/login-action@v3
- with:
- registry: ghcr.io
- username: ${{ github.repository_owner }}
- password: ${{ secrets.GITHUB_TOKEN }}
-
- - name: Extract metadata for manifest
- id: meta
- uses: docker/metadata-action@v5
- with:
- images: ${{ matrix.image }}
- tags: |
- type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
- type=sha,format=long
-
- - name: Create and push manifest
- run: |
- # Extract the tags from metadata (these are the final manifest tags we want)
- MANIFEST_TAGS="${{ steps.meta.outputs.tags }}"
-
- # Create manifest for each tag
- for manifest_tag in $MANIFEST_TAGS; do
- echo "Creating manifest for $manifest_tag"
-
- # The architecture-specific images have -amd64 and -arm64 suffixes
- amd64_image="${manifest_tag}-amd64"
- arm64_image="${manifest_tag}-arm64"
-
- echo "Looking for images: $amd64_image and $arm64_image"
-
- # Check if both architecture images exist
- if docker manifest inspect "$amd64_image" >/dev/null 2>&1 && docker manifest inspect "$arm64_image" >/dev/null 2>&1; then
- echo "Both images found, creating manifest..."
- docker manifest create "$manifest_tag" \
- "$amd64_image" \
- "$arm64_image"
- docker manifest push "$manifest_tag"
- echo "Successfully created and pushed manifest for $manifest_tag"
- else
- echo "Error: One or both architecture images not found"
- echo "Checking AMD64 image: $amd64_image"
- docker manifest inspect "$amd64_image" || echo "AMD64 image not found"
- echo "Checking ARM64 image: $arm64_image"
- docker manifest inspect "$arm64_image" || echo "ARM64 image not found"
- exit 1
- fi
- done
\ No newline at end of file
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 2d523dafb1..b1c9e8b753 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -6,74 +6,53 @@ on:
pull_request:
branches: [main, staging]
+concurrency:
+ group: ci-${{ github.ref }}
+ cancel-in-progress: false
+
jobs:
- test:
+ test-build:
name: Test and Build
- runs-on: ubuntu-latest
-
- steps:
- - name: Checkout code
- uses: actions/checkout@v4
-
- - name: Setup Bun
- uses: oven-sh/setup-bun@v2
- with:
- bun-version: latest
-
- - name: Setup Node
- uses: actions/setup-node@v4
- with:
- node-version: latest
-
- - name: Install dependencies
- run: bun install --frozen-lockfile
-
- - name: Run tests with coverage
- env:
- NODE_OPTIONS: '--no-warnings'
- NEXT_PUBLIC_APP_URL: 'https://www.sim.ai'
- DATABASE_URL: 'postgresql://postgres:postgres@localhost:5432/simstudio'
- ENCRYPTION_KEY: '7cf672e460e430c1fba707575c2b0e2ad5a99dddf9b7b7e3b5646e630861db1c' # dummy key for CI only
- run: bun run test
+ uses: ./.github/workflows/test-build.yml
+ secrets: inherit
- - name: Build application
- env:
- NODE_OPTIONS: '--no-warnings'
- NEXT_PUBLIC_APP_URL: 'https://www.sim.ai'
- DATABASE_URL: 'postgresql://postgres:postgres@localhost:5432/simstudio'
- STRIPE_SECRET_KEY: 'dummy_key_for_ci_only'
- STRIPE_WEBHOOK_SECRET: 'dummy_secret_for_ci_only'
- RESEND_API_KEY: 'dummy_key_for_ci_only'
- AWS_REGION: 'us-west-2'
- ENCRYPTION_KEY: '7cf672e460e430c1fba707575c2b0e2ad5a99dddf9b7b7e3b5646e630861db1c' # dummy key for CI only
- run: bun run build
-
- - name: Upload coverage to Codecov
- uses: codecov/codecov-action@v5
- with:
- directory: ./apps/sim/coverage
- fail_ci_if_error: false
- verbose: true
+ # Build and push images (ECR for staging, ECR + GHCR for main)
+ build-images:
+ name: Build Images
+ needs: test-build
+ if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging')
+ uses: ./.github/workflows/images.yml
+ secrets: inherit
+ permissions:
+ contents: read
+ packages: write
+ id-token: write
+
+ # Deploy Trigger.dev (after builds complete)
+ trigger-deploy:
+ name: Deploy Trigger.dev
+ needs: build-images
+ if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging')
+ uses: ./.github/workflows/trigger-deploy.yml
+ secrets: inherit
+ # Run database migrations (depends on build completion and trigger deployment)
migrations:
name: Apply Database Migrations
- runs-on: ubuntu-latest
+ needs: [build-images, trigger-deploy]
+ if: |
+ always() &&
+ github.event_name == 'push' &&
+ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging') &&
+ needs.build-images.result == 'success' &&
+ needs.trigger-deploy.result == 'success'
+ uses: ./.github/workflows/migrations.yml
+ secrets: inherit
+
+ # Process docs embeddings if needed
+ process-docs:
+ name: Process Docs
+ needs: migrations
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging')
- needs: test
- steps:
- - name: Checkout code
- uses: actions/checkout@v4
-
- - name: Setup Bun
- uses: oven-sh/setup-bun@v2
- with:
- bun-version: latest
-
- - name: Install dependencies
- run: bun install
-
- - name: Apply migrations
- working-directory: ./packages/db
- env:
- DATABASE_URL: ${{ github.ref == 'refs/heads/main' && secrets.DATABASE_URL || secrets.STAGING_DATABASE_URL }}
- run: bunx drizzle-kit migrate --config=./drizzle.config.ts
+ uses: ./.github/workflows/docs-embeddings.yml
+ secrets: inherit
diff --git a/.github/workflows/docs-embeddings.yml b/.github/workflows/docs-embeddings.yml
index f59da979ee..d61d866165 100644
--- a/.github/workflows/docs-embeddings.yml
+++ b/.github/workflows/docs-embeddings.yml
@@ -1,16 +1,13 @@
name: Process Docs Embeddings
on:
- push:
- branches: [main, staging]
- paths:
- - 'apps/docs/**'
+ workflow_call:
workflow_dispatch: # Allow manual triggering
jobs:
process-docs-embeddings:
name: Process Documentation Embeddings
- runs-on: ubuntu-latest
+ runs-on: blacksmith-4vcpu-ubuntu-2404
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/staging'
steps:
diff --git a/.github/workflows/i18n.yml b/.github/workflows/i18n.yml
index c7806facfd..5275b9444b 100644
--- a/.github/workflows/i18n.yml
+++ b/.github/workflows/i18n.yml
@@ -14,7 +14,7 @@ permissions:
jobs:
translate:
- runs-on: ubuntu-latest
+ runs-on: blacksmith-4vcpu-ubuntu-2404
if: github.actor != 'github-actions[bot]' # Prevent infinite loops
steps:
@@ -55,7 +55,7 @@ jobs:
with:
token: ${{ secrets.GH_PAT }}
commit-message: "feat(i18n): update translations"
- title: "🌐 Auto-update translations"
+ title: "feat(i18n): update translations"
body: |
## Summary
Automated translation updates triggered by changes to documentation.
@@ -76,8 +76,10 @@ jobs:
## Testing
This PR includes automated translations for modified English documentation content:
- 🇪🇸 Spanish (es) translations
- - 🇫🇷 French (fr) translations
+ - 🇫🇷 French (fr) translations
- 🇨🇳 Chinese (zh) translations
+ - 🇯🇵 Japanese (ja) translations
+ - 🇩🇪 German (de) translations
**What reviewers should focus on:**
- Verify translated content accuracy and context
@@ -102,7 +104,7 @@ jobs:
verify-translations:
needs: translate
- runs-on: ubuntu-latest
+ runs-on: blacksmith-4vcpu-ubuntu-2404
if: always() # Run even if translation fails
steps:
@@ -137,15 +139,21 @@ jobs:
es_count=$(find content/docs/es -name "*.mdx" 2>/dev/null | wc -l || echo 0)
fr_count=$(find content/docs/fr -name "*.mdx" 2>/dev/null | wc -l || echo 0)
zh_count=$(find content/docs/zh -name "*.mdx" 2>/dev/null | wc -l || echo 0)
+ ja_count=$(find content/docs/ja -name "*.mdx" 2>/dev/null | wc -l || echo 0)
+ de_count=$(find content/docs/de -name "*.mdx" 2>/dev/null | wc -l || echo 0)
es_percentage=$((es_count * 100 / en_count))
fr_percentage=$((fr_count * 100 / en_count))
zh_percentage=$((zh_count * 100 / en_count))
+ ja_percentage=$((ja_count * 100 / en_count))
+ de_percentage=$((de_count * 100 / en_count))
echo "### Coverage Statistics" >> $GITHUB_STEP_SUMMARY
echo "- **🇬🇧 English**: $en_count files (source)" >> $GITHUB_STEP_SUMMARY
echo "- **🇪🇸 Spanish**: $es_count/$en_count files ($es_percentage%)" >> $GITHUB_STEP_SUMMARY
echo "- **🇫🇷 French**: $fr_count/$en_count files ($fr_percentage%)" >> $GITHUB_STEP_SUMMARY
echo "- **🇨🇳 Chinese**: $zh_count/$en_count files ($zh_percentage%)" >> $GITHUB_STEP_SUMMARY
+ echo "- **🇯🇵 Japanese**: $ja_count/$en_count files ($ja_percentage%)" >> $GITHUB_STEP_SUMMARY
+ echo "- **🇩🇪 German**: $de_count/$en_count files ($de_percentage%)" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "🔄 **Auto-translation PR**: Check for new pull request with updated translations" >> $GITHUB_STEP_SUMMARY
\ No newline at end of file
diff --git a/.github/workflows/images.yml b/.github/workflows/images.yml
new file mode 100644
index 0000000000..e55e227b8e
--- /dev/null
+++ b/.github/workflows/images.yml
@@ -0,0 +1,184 @@
+name: Build and Push Images
+
+on:
+ workflow_call:
+ workflow_dispatch:
+
+permissions:
+ contents: read
+ packages: write
+ id-token: write
+
+jobs:
+ build-amd64:
+ name: Build AMD64
+ runs-on: blacksmith-4vcpu-ubuntu-2404
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - dockerfile: ./docker/app.Dockerfile
+ ghcr_image: ghcr.io/simstudioai/simstudio
+ ecr_repo_secret: ECR_APP
+ - dockerfile: ./docker/db.Dockerfile
+ ghcr_image: ghcr.io/simstudioai/migrations
+ ecr_repo_secret: ECR_MIGRATIONS
+ - dockerfile: ./docker/realtime.Dockerfile
+ ghcr_image: ghcr.io/simstudioai/realtime
+ ecr_repo_secret: ECR_REALTIME
+ outputs:
+ registry: ${{ steps.login-ecr.outputs.registry }}
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+
+ - name: Configure AWS credentials
+ uses: aws-actions/configure-aws-credentials@v4
+ with:
+ role-to-assume: ${{ github.ref == 'refs/heads/main' && secrets.AWS_ROLE_TO_ASSUME || secrets.STAGING_AWS_ROLE_TO_ASSUME }}
+ aws-region: ${{ github.ref == 'refs/heads/main' && secrets.AWS_REGION || secrets.STAGING_AWS_REGION }}
+
+ - name: Login to Amazon ECR
+ id: login-ecr
+ uses: aws-actions/amazon-ecr-login@v2
+
+ - name: Login to Docker Hub
+ uses: docker/login-action@v3
+ with:
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
+
+ - name: Login to GHCR
+ if: github.ref == 'refs/heads/main'
+ uses: docker/login-action@v3
+ with:
+ registry: ghcr.io
+ username: ${{ github.repository_owner }}
+ password: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Set up Docker Buildx
+ uses: useblacksmith/setup-docker-builder@v1
+
+ - name: Generate tags
+ id: meta
+ run: |
+ ECR_REGISTRY="${{ steps.login-ecr.outputs.registry }}"
+ ECR_REPO="${{ secrets[matrix.ecr_repo_secret] }}"
+ GHCR_IMAGE="${{ matrix.ghcr_image }}"
+
+ # ECR tags (always build for ECR)
+ if [ "${{ github.ref }}" = "refs/heads/main" ]; then
+ ECR_TAG="latest"
+ else
+ ECR_TAG="staging"
+ fi
+ ECR_IMAGE="${ECR_REGISTRY}/${ECR_REPO}:${ECR_TAG}"
+
+ # Build tags list
+ TAGS="${ECR_IMAGE}"
+
+ # Add GHCR tags only for main branch
+ if [ "${{ github.ref }}" = "refs/heads/main" ]; then
+ GHCR_AMD64="${GHCR_IMAGE}:latest-amd64"
+ GHCR_SHA="${GHCR_IMAGE}:${{ github.sha }}-amd64"
+ TAGS="${TAGS},$GHCR_AMD64,$GHCR_SHA"
+ fi
+
+ echo "tags=${TAGS}" >> $GITHUB_OUTPUT
+
+ - name: Build and push images
+ uses: useblacksmith/build-push-action@v2
+ with:
+ context: .
+ file: ${{ matrix.dockerfile }}
+ platforms: linux/amd64
+ push: true
+ tags: ${{ steps.meta.outputs.tags }}
+ provenance: false
+ sbom: false
+
+ build-ghcr-arm64:
+ name: Build ARM64 (GHCR Only)
+ runs-on: linux-arm64-8-core
+ if: github.ref == 'refs/heads/main'
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - dockerfile: ./docker/app.Dockerfile
+ image: ghcr.io/simstudioai/simstudio
+ - dockerfile: ./docker/db.Dockerfile
+ image: ghcr.io/simstudioai/migrations
+ - dockerfile: ./docker/realtime.Dockerfile
+ image: ghcr.io/simstudioai/realtime
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+
+ - name: Login to GHCR
+ uses: docker/login-action@v3
+ with:
+ registry: ghcr.io
+ username: ${{ github.repository_owner }}
+ password: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Set up Docker Buildx
+ uses: useblacksmith/setup-docker-builder@v1
+
+ - name: Generate ARM64 tags
+ id: meta
+ uses: docker/metadata-action@v5
+ with:
+ images: ${{ matrix.image }}
+ tags: |
+ type=raw,value=latest-arm64
+ type=sha,format=long,suffix=-arm64
+
+ - name: Build and push ARM64 to GHCR
+ uses: useblacksmith/build-push-action@v2
+ with:
+ context: .
+ file: ${{ matrix.dockerfile }}
+ platforms: linux/arm64
+ push: true
+ tags: ${{ steps.meta.outputs.tags }}
+ provenance: false
+ sbom: false
+
+ create-ghcr-manifests:
+ name: Create GHCR Manifests
+ runs-on: blacksmith-4vcpu-ubuntu-2404
+ needs: [build-amd64, build-ghcr-arm64]
+ if: github.ref == 'refs/heads/main'
+ strategy:
+ matrix:
+ include:
+ - image: ghcr.io/simstudioai/simstudio
+ - image: ghcr.io/simstudioai/migrations
+ - image: ghcr.io/simstudioai/realtime
+
+ steps:
+ - name: Login to GHCR
+ uses: docker/login-action@v3
+ with:
+ registry: ghcr.io
+ username: ${{ github.repository_owner }}
+ password: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Create and push manifests
+ run: |
+ IMAGE_BASE="${{ matrix.image }}"
+
+ # Create latest manifest
+ docker manifest create "${IMAGE_BASE}:latest" \
+ "${IMAGE_BASE}:latest-amd64" \
+ "${IMAGE_BASE}:latest-arm64"
+ docker manifest push "${IMAGE_BASE}:latest"
+
+ # Create SHA manifest
+ docker manifest create "${IMAGE_BASE}:${{ github.sha }}" \
+ "${IMAGE_BASE}:${{ github.sha }}-amd64" \
+ "${IMAGE_BASE}:${{ github.sha }}-arm64"
+ docker manifest push "${IMAGE_BASE}:${{ github.sha }}"
\ No newline at end of file
diff --git a/.github/workflows/migrations.yml b/.github/workflows/migrations.yml
new file mode 100644
index 0000000000..191ee0fea2
--- /dev/null
+++ b/.github/workflows/migrations.yml
@@ -0,0 +1,28 @@
+name: Database Migrations
+
+on:
+ workflow_call:
+ workflow_dispatch:
+
+jobs:
+ migrate:
+ name: Apply Database Migrations
+ runs-on: blacksmith-4vcpu-ubuntu-2404
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+
+ - name: Setup Bun
+ uses: oven-sh/setup-bun@v2
+ with:
+ bun-version: latest
+
+ - name: Install dependencies
+ run: bun install
+
+ - name: Apply migrations
+ working-directory: ./packages/db
+ env:
+ DATABASE_URL: ${{ github.ref == 'refs/heads/main' && secrets.DATABASE_URL || secrets.STAGING_DATABASE_URL }}
+ run: bunx drizzle-kit migrate --config=./drizzle.config.ts
\ No newline at end of file
diff --git a/.github/workflows/publish-cli.yml b/.github/workflows/publish-cli.yml
index 41bce6a7b6..88209378c9 100644
--- a/.github/workflows/publish-cli.yml
+++ b/.github/workflows/publish-cli.yml
@@ -8,7 +8,7 @@ on:
jobs:
publish-npm:
- runs-on: ubuntu-latest
+ runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- name: Checkout repository
uses: actions/checkout@v4
diff --git a/.github/workflows/publish-python-sdk.yml b/.github/workflows/publish-python-sdk.yml
index 6892405de1..fdd208075a 100644
--- a/.github/workflows/publish-python-sdk.yml
+++ b/.github/workflows/publish-python-sdk.yml
@@ -8,7 +8,7 @@ on:
jobs:
publish-pypi:
- runs-on: ubuntu-latest
+ runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- name: Checkout repository
uses: actions/checkout@v4
diff --git a/.github/workflows/publish-ts-sdk.yml b/.github/workflows/publish-ts-sdk.yml
index 360f5aa20a..b1e733355e 100644
--- a/.github/workflows/publish-ts-sdk.yml
+++ b/.github/workflows/publish-ts-sdk.yml
@@ -8,7 +8,7 @@ on:
jobs:
publish-npm:
- runs-on: ubuntu-latest
+ runs-on: blacksmith-4vcpu-ubuntu-2404
steps:
- name: Checkout repository
uses: actions/checkout@v4
diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml
new file mode 100644
index 0000000000..2022aed361
--- /dev/null
+++ b/.github/workflows/test-build.yml
@@ -0,0 +1,54 @@
+name: Test and Build
+
+on:
+ workflow_call:
+ workflow_dispatch:
+
+jobs:
+ test-build:
+ name: Test and Build
+ runs-on: blacksmith-4vcpu-ubuntu-2404
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+
+ - name: Setup Bun
+ uses: oven-sh/setup-bun@v2
+ with:
+ bun-version: latest
+
+ - name: Setup Node
+ uses: actions/setup-node@v4
+ with:
+ node-version: latest
+
+ - name: Install dependencies
+ run: bun install --frozen-lockfile
+
+ - name: Run tests with coverage
+ env:
+ NODE_OPTIONS: '--no-warnings'
+ NEXT_PUBLIC_APP_URL: 'https://www.sim.ai'
+ DATABASE_URL: 'postgresql://postgres:postgres@localhost:5432/simstudio'
+ ENCRYPTION_KEY: '7cf672e460e430c1fba707575c2b0e2ad5a99dddf9b7b7e3b5646e630861db1c' # dummy key for CI only
+ run: bun run test
+
+ - name: Build application
+ env:
+ NODE_OPTIONS: '--no-warnings'
+ NEXT_PUBLIC_APP_URL: 'https://www.sim.ai'
+ DATABASE_URL: 'postgresql://postgres:postgres@localhost:5432/simstudio'
+ STRIPE_SECRET_KEY: 'dummy_key_for_ci_only'
+ STRIPE_WEBHOOK_SECRET: 'dummy_secret_for_ci_only'
+ RESEND_API_KEY: 'dummy_key_for_ci_only'
+ AWS_REGION: 'us-west-2'
+ ENCRYPTION_KEY: '7cf672e460e430c1fba707575c2b0e2ad5a99dddf9b7b7e3b5646e630861db1c' # dummy key for CI only
+ run: bun run build
+
+ - name: Upload coverage to Codecov
+ uses: codecov/codecov-action@v5
+ with:
+ directory: ./apps/sim/coverage
+ fail_ci_if_error: false
+ verbose: true
\ No newline at end of file
diff --git a/.github/workflows/trigger-deploy.yml b/.github/workflows/trigger-deploy.yml
index 2ff92647bf..e8a47275d8 100644
--- a/.github/workflows/trigger-deploy.yml
+++ b/.github/workflows/trigger-deploy.yml
@@ -1,28 +1,27 @@
name: Trigger.dev Deploy
on:
- push:
- branches:
- - main
- - staging
+ workflow_call:
+ workflow_dispatch:
jobs:
deploy:
- name: Trigger.dev Deploy
- runs-on: ubuntu-latest
+ 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 }}
+
steps:
- - name: Checkout repository
+ - name: Checkout code
uses: actions/checkout@v4
- - name: Setup Node.js
+ - name: Setup Node
uses: actions/setup-node@v4
with:
- node-version: 'lts/*'
+ node-version: latest
- name: Setup Bun
uses: oven-sh/setup-bun@v2
@@ -32,13 +31,12 @@ jobs:
- name: Install dependencies
run: bun install
- - name: Deploy to Staging
+ - 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 Production
+ - 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
-
+ run: npx --yes trigger.dev@4.0.4 deploy
\ No newline at end of file
diff --git a/apps/docs/components/ui/language-dropdown.tsx b/apps/docs/components/ui/language-dropdown.tsx
index 8067c96f56..0a474a491f 100644
--- a/apps/docs/components/ui/language-dropdown.tsx
+++ b/apps/docs/components/ui/language-dropdown.tsx
@@ -2,12 +2,14 @@
import { useEffect, useState } from 'react'
import { Check, ChevronDown } from 'lucide-react'
-import { useParams, usePathname } from 'next/navigation'
+import { useParams, usePathname, useRouter } from 'next/navigation'
const languages = {
en: { name: 'English', flag: '🇺🇸' },
es: { name: 'Español', flag: '🇪🇸' },
fr: { name: 'Français', flag: '🇫🇷' },
+ de: { name: 'Deutsch', flag: '🇩🇪' },
+ ja: { name: '日本語', flag: '🇯🇵' },
zh: { name: '简体中文', flag: '🇨🇳' },
}
@@ -15,6 +17,7 @@ export function LanguageDropdown() {
const [isOpen, setIsOpen] = useState(false)
const pathname = usePathname()
const params = useParams()
+ const router = useRouter()
const [currentLang, setCurrentLang] = useState(() => {
const langFromParams = params?.lang as string
@@ -56,9 +59,18 @@ export function LanguageDropdown() {
newPath = `/${locale}${segments.length > 0 ? `/${segments.join('/')}` : '/introduction'}`
}
- window.location.href = newPath
+ router.push(newPath)
}
+ useEffect(() => {
+ if (!isOpen) return
+ const onKey = (e: KeyboardEvent) => {
+ if (e.key === 'Escape') setIsOpen(false)
+ }
+ window.addEventListener('keydown', onKey)
+ return () => window.removeEventListener('keydown', onKey)
+ }, [isOpen])
+
return (