SigmaFlow Deploy
Overview
Automates deployment of the SigmaFlow trading frontend to the GitLab repository at http://git.homelab:3000/vitali/SigmaFlow-Svelte. This skill handles the full deployment workflow: repository management, dependency installation, SvelteKit production build, and pushing to the remote repository.
Quick Start
Basic Deployment
CODEBLOCK0
When to Run
- - After completing a feature implementation (charts, orders, portfolio)
- After bug fixes or code changes
- Before testing in production environment
- As part of CI/CD pipeline integration
Deployment Workflow
The deployment script performs these steps:
- 1. Clone/Update Repository: Clones from GitLab if needed, or updates existing clone
- Install Dependencies: Runs
npm install if node_modules doesn't exist - Build Application: Runs
npm run build to create production bundle - Commit Changes: Stages all changes with timestamped commit message
- Push to Remote: Pushes to specified branch (default: main)
Repository Credentials
The script uses embedded credentials:
- - URL: INLINECODE3
- Token: INLINECODE4
Security Note: These credentials are stored in the script. For production environments, consider environment variables or secret management.
Parameters
The deploy script accepts optional parameters:
- -
$1 (optional): Repository directory path (default: ./SigmaFlow-Svelte) - INLINECODE7 (optional): Branch name to push (default:
main)
Output
On success, the script displays:
- -
[INFO] messages for each step - Final success message with deployment confirmation
- Application URL (configure based on hosting setup)
On no changes:
- -
[WARN] indicating no changes to commit - Graceful exit (no git push)
Troubleshooting
Build fails: Check SvelteKit configuration and fix errors, then re-run deploy
Authentication error: Verify token is valid and has write access to repository
Push rejected: Pull latest changes, resolve conflicts, then deploy again
SigmaFlow Deploy
概述
自动化将SigmaFlow交易前端部署到位于http://git.homelab:3000/vitali/SigmaFlow-Svelte的GitLab仓库。本技能处理完整的部署工作流程:仓库管理、依赖安装、SvelteKit生产构建以及推送到远程仓库。
快速开始
基础部署
bash
部署到主分支(默认)
scripts/deploy.sh
部署到特定分支
scripts/deploy.sh ./SigmaFlow-Svelte main
使用自定义仓库目录
scripts/deploy.sh /path/to/repo dev
何时运行
- - 完成功能实现后(图表、订单、投资组合)
- 修复错误或更改代码后
- 在生产环境测试之前
- 作为CI/CD流水线集成的一部分
部署工作流程
部署脚本执行以下步骤:
- 1. 克隆/更新仓库:根据需要从GitLab克隆,或更新现有克隆
- 安装依赖:如果node_modules不存在,则运行npm install
- 构建应用程序:运行npm run build创建生产构建包
- 提交更改:使用带时间戳的提交信息暂存所有更改
- 推送到远程:推送到指定分支(默认:main)
仓库凭据
脚本使用内嵌凭据:
- - URL:http://git.homelab:3000/vitali/SigmaFlow-Svelte.git
- 令牌:c865b793f09a3b79b65ebdfbd75c5b17395188d2
安全说明:这些凭据存储在脚本中。对于生产环境,请考虑使用环境变量或密钥管理。
参数
部署脚本接受可选参数:
- - $1(可选):仓库目录路径(默认:./SigmaFlow-Svelte)
- $2(可选):要推送的分支名称(默认:main)
输出
成功时,脚本显示:
- - 每个步骤的[INFO]消息
- 带有部署确认的最终成功消息
- 应用程序URL(根据托管设置配置)
无更改时:
- - [WARN]表示没有要提交的更改
- 正常退出(不执行git push)
故障排除
构建失败:检查SvelteKit配置并修复错误,然后重新运行部署
认证错误:验证令牌是否有效且具有仓库写入权限
推送被拒绝:拉取最新更改,解决冲突,然后重新部署