diff --git a/.github/workflows/deploy-langgraph.yml b/.github/workflows/deploy-langgraph.yml index cd469bd..2ae4e51 100644 --- a/.github/workflows/deploy-langgraph.yml +++ b/.github/workflows/deploy-langgraph.yml @@ -25,15 +25,23 @@ jobs: with: node-version: "20" + - name: Setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 10 + + - name: Install dependencies + run: | + cd langgraph + pnpm install --frozen-lockfile + - name: Package for deployment run: | cd langgraph - # Create langgraphjs dev prerequisites touch .env mkdir -p .langgraph_api - # Package source only — Oryx will install node_modules on Azure zip -r ../deploy-langgraph.zip . \ - -x "node_modules/*" ".git/*" "dist/*" ".DS_Store" + -x ".git/*" "dist/*" ".DS_Store" - name: Login to Azure uses: azure/login@v2 diff --git a/langgraph/startup.sh b/langgraph/startup.sh index d0c020e..1a03c48 100644 --- a/langgraph/startup.sh +++ b/langgraph/startup.sh @@ -9,17 +9,5 @@ cd /home/site/wwwroot touch .env mkdir -p .langgraph_api -# Install pnpm globally if not available -if ! command -v pnpm &> /dev/null; then - echo "Installing pnpm..." - npm install -g pnpm@10 -fi - -# Install dependencies if node_modules is missing (Oryx should have done this, but fallback) -if [ ! -d "node_modules" ]; then - echo "node_modules not found, installing dependencies..." - pnpm install --frozen-lockfile -fi - echo "Starting LangGraph server on port ${PORT:-8080}..." -exec npx langgraphjs dev --host 0.0.0.0 --port ${PORT:-8080} --no-browser +exec ./node_modules/.bin/langgraphjs dev --host 0.0.0.0 --port ${PORT:-8080} --no-browser