From 58775a25d9592a853c5bd88b789de6c25ad85e51 Mon Sep 17 00:00:00 2001 From: kenneth Date: Tue, 23 Sep 2025 23:06:05 +0000 Subject: [PATCH] build: add bun install to automation startup - Add bun-install service to run on postEnvironmentStart - Fix incorrect workspace paths in existing services - Ensure dependencies are installed before dev servers start Co-authored-by: Ona --- .gitpod/automations.yaml | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/.gitpod/automations.yaml b/.gitpod/automations.yaml index f074ab2..9135b6c 100644 --- a/.gitpod/automations.yaml +++ b/.gitpod/automations.yaml @@ -1,11 +1,32 @@ services: + bun-install: + name: Install Dependencies + description: Installs project dependencies using bun install + commands: + start: | + echo "Installing dependencies with bun..." + cd /workspaces/drive + bun install + echo "Dependencies installed successfully" + ready: | + # Check if node_modules exists and has content + if [ -d "/workspaces/drive/node_modules" ] && [ "$(ls -A /workspaces/drive/node_modules)" ]; then + echo "Dependencies are installed" + exit 0 + else + echo "Dependencies are not installed" + exit 1 + fi + triggeredBy: + - postEnvironmentStart + bun-dev: name: Bun Development Server description: Runs the Bun development server with hot reloading commands: start: | echo "Starting Bun development server..." - cd /workspaces/workspaces + cd /workspaces/drive bun run dev ready: | # Check if the development server is responding @@ -29,7 +50,7 @@ services: commands: start: | echo "Starting Convex development server..." - cd /workspaces/workspaces + cd /workspaces/drive bunx convex dev ready: | # Check if Convex dev server is running by looking for the process