CRM/.gitlab-ci.yml
2026-10-10 15:44:27 +05:30

39 lines
808 B
YAML

stages:
- build
- deploy
cache:
key: "${CI_COMMIT_REF_SLUG}"
paths:
- node_modules/
policy: pull-push
build:
stage: build
tags:
- crm-build
script:
- echo "Installing dependencies..."
- npm ci --include=dev
- echo "Building React app with Vite..."
- export NODE_OPTIONS="--max-old-space-size=4096"
- CI=false npm run build
artifacts:
paths:
- build
expire_in: 1 hour
deploy:
stage: deploy
tags:
- crm-build
script:
- echo "Deploying to /var/www/html/crm-test..."
- sudo rm -rf /var/www/html/crm-test/*
- sudo cp -r build/* /var/www/html/crm-test/
- echo "Deployment complete!"
environment:
name: production
url: http://75.119.152.53/crm-test
dependencies:
- build