26382a7ac6
CI / Clippy (push) Failing after 15m13s
CI / Test (ubuntu-latest) (push) Failing after 16m1s
CI / Test (macos-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Build (no embeddings / no ORT) (push) Has been cancelled
CI / Format (push) Has been cancelled
CI / Cookbook (Node) (push) Has been cancelled
CI / Pi Extension (Node) (push) Has been cancelled
CI / Rust SDK (lean-ctx-client) (push) Has been cancelled
CI / Embed SDK (lean-ctx-sdk) (push) Has been cancelled
CI / Python SDK (leanctx) (push) Has been cancelled
CI / Hermes Plugin (Python) (push) Has been cancelled
CI / SDK Conformance Matrix (push) Has been cancelled
CI / Coverage (push) Has been cancelled
CI / cargo-deny (push) Has been cancelled
CI / Adversarial Safety (push) Has been cancelled
CI / Benchmarks (push) Has been cancelled
CI / Output-Quality Gate (eval A/B) (push) Has been cancelled
CI / Documentation (push) Has been cancelled
CI / CI Green (push) Has been cancelled
JetBrains Plugin / Actionlint (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
CodeQL / Analyze (rust) (push) Has been cancelled
JetBrains Plugin / Validation (push) Has been cancelled
JetBrains Plugin / Build (push) Has been cancelled
JetBrains Plugin / Test (push) Has been cancelled
Security Check / Security Scan (push) Has been cancelled
55 lines
1.4 KiB
YAML
55 lines
1.4 KiB
YAML
# GitLab CI — Website deployment only
|
|
# All Rust CI (test, clippy, fmt, benchmarks, coverage) runs on GitHub Actions.
|
|
# This pipeline is only active on the `deploy` branch for website builds.
|
|
|
|
workflow:
|
|
rules:
|
|
- if: $CI_COMMIT_BRANCH == "deploy"
|
|
- when: never
|
|
|
|
stages:
|
|
- build
|
|
- deploy
|
|
|
|
website_build:
|
|
stage: build
|
|
image: node:22.12.0
|
|
variables:
|
|
NPM_CONFIG_CACHE: "$CI_PROJECT_DIR/website/.npm"
|
|
cache:
|
|
key: "website-${CI_COMMIT_REF_SLUG}"
|
|
paths:
|
|
- website/.npm/
|
|
script:
|
|
- cd website
|
|
- npm ci
|
|
- npm run build
|
|
|
|
deploy_website:
|
|
stage: deploy
|
|
image: docker:24
|
|
needs: []
|
|
variables:
|
|
CONTAINER_NAME: leanctx-web
|
|
IMAGE_NAME: lean-ctx-web
|
|
DOCKER_HOST: unix:///var/run/docker.sock
|
|
script:
|
|
- echo "Building website image from source (multi-stage Dockerfile)..."
|
|
- test "$(git ls-files website/dist | wc -l)" -eq 0
|
|
- test "$(git ls-files website/node_modules | wc -l)" -eq 0
|
|
- cd website
|
|
- docker build -t ${IMAGE_NAME}:latest .
|
|
- echo "Stopping old container..."
|
|
- docker stop ${CONTAINER_NAME} || true
|
|
- docker rm ${CONTAINER_NAME} || true
|
|
- echo "Starting new container..."
|
|
- docker run -d
|
|
--name ${CONTAINER_NAME}
|
|
--network coolify
|
|
--restart unless-stopped
|
|
${IMAGE_NAME}:latest
|
|
- echo "Verifying..."
|
|
- sleep 2
|
|
- docker ps --filter name=${CONTAINER_NAME} --format "{{.Status}}"
|
|
- echo "Deploy complete!"
|