open-swe/.github/workflows/deploy-langgraph.yml
open-swe[bot] 8eb83c11e5
feat: Add LangGraph Deployment GitHub Action and TypeScript Deployment Script (#550)
* Apply patch

* Apply patch

* Apply patch

* Apply patch

* Apply patch

* Apply patch

* Apply patch

* Apply patch

* Apply patch

* Apply patch

* Apply patch

* move into workflows dir

* cr

---------

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
Co-authored-by: bracesproul <braceasproul@gmail.com>
2025-07-28 18:32:11 -07:00

60 lines
1.7 KiB
YAML

name: Deploy LangGraph
on:
push:
branches: ["main"]
paths:
- "apps/open-swe/**"
- "packages/shared/**"
- "package.json"
workflow_dispatch: # Allows manual triggering
# If another push happens while this workflow is still running,
# cancel the earlier run in favor of the next run.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
deploy:
name: Deploy to LangGraph Platform
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Enable Corepack
run: corepack enable
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "yarn"
- name: Install dependencies
run: yarn install --immutable --mode=skip-build
- name: Build packages
run: yarn build
- name: Compile deployment script
run: |
cd apps/open-swe
yarn tsc --module commonjs --skipLibCheck --outDir ./dist/scripts ./scripts/deploy-langgraph.ts
mv ./dist/scripts/deploy-langgraph.js ./dist/scripts/deploy-langgraph.cjs
- name: Execute deployment
run: |
cd apps/open-swe
node ./dist/scripts/deploy-langgraph.cjs
env:
CONTROL_PLANE_HOST: ${{ secrets.CONTROL_PLANE_HOST }}
LANGSMITH_API_KEY: ${{ secrets.LANGSMITH_API_KEY }}
INTEGRATION_ID: ${{ secrets.INTEGRATION_ID }}
DEPLOYMENT_ID: ${{ secrets.DEPLOYMENT_ID }}
timeout-minutes: 35
- name: Deployment status
if: always()
run: echo "Deployment workflow completed with status ${{ job.status }}"