1 NUNA
Leng Kundee edited this page 2026-01-30 22:22:34 +00:00

GitHub Actions CI/CD for Trading Bridge

🚀 Automated Deployment Workflows

This repository includes GitHub Actions workflows for automated testing, validation, and deployment of the Trading Bridge system.


📋 Available Workflows

1. Test and Validate (test-and-validate.yml)

Triggers: Push to main/develop, Pull Requests

What it does:

  • Validates Python syntax
  • Checks configuration files
  • Validates deployment scripts
  • Security check for sensitive data
  • Ensures brokers.json is not committed

View: https://github.com/A6-9V/my-drive-projects/actions/workflows/test-and-validate.yml


2. Auto Deploy to VPS (auto-deploy-vps.yml)

Triggers: Push to main (trading-bridge changes), Manual dispatch

What it does:

  • Validates deployment package
  • Checks all required files
  • Validates Python dependencies
  • Creates deployment artifact
  • Generates deployment instructions

View: https://github.com/A6-9V/my-drive-projects/actions/workflows/auto-deploy-vps.yml


3. Deploy Trading Bridge (deploy-trading-bridge.yml)

Triggers: Push to main (trading-bridge changes), Manual dispatch

What it does:

  • Installs dependencies
  • Validates configuration
  • Checks deployment scripts
  • Creates deployment summary
  • Provides VPS deployment commands

View: https://github.com/A6-9V/my-drive-projects/actions/workflows/deploy-trading-bridge.yml


🔄 How It Works

Automatic Triggers

  1. On Push to Main:

    • All workflows run automatically
    • Validates code changes
    • Creates deployment packages
    • Generates deployment instructions
  2. On Pull Request:

    • Test and Validate workflow runs
    • Ensures code quality before merge
  3. Manual Dispatch:

    • Go to Actions tab
    • Select workflow
    • Click "Run workflow"
    • Choose deployment target

📦 Deployment Artifacts

After each successful run, you can:

  1. Download deployment artifacts
  2. View deployment instructions
  3. See validation results

Location: Actions → Workflow run → Artifacts


🔒 Security Features

  • Checks for sensitive data in commits
  • Validates brokers.json is gitignored
  • Ensures no API keys in repository
  • Validates configuration templates

🚀 Deployment Process

  1. Push to GitHub:

    git add .
    git commit -m "Update trading bridge"
    git push origin main
    
  2. GitHub Actions runs automatically:

    • Validates code
    • Creates deployment package
    • Generates instructions
  3. On VPS:

    cd C:\my-drive-projects\trading-bridge
    git pull origin main
    .\DEPLOY_NOW.ps1
    

Manual Deployment

  1. Go to: https://github.com/A6-9V/my-drive-projects/actions
  2. Select workflow
  3. Click "Run workflow"
  4. Choose options
  5. Click "Run workflow"

📊 Workflow Status

View all workflow runs: https://github.com/A6-9V/my-drive-projects/actions


🔧 Customization

Modify Workflows

Edit workflow files in .github/workflows/:

  • deploy-trading-bridge.yml
  • auto-deploy-vps.yml
  • test-and-validate.yml

Add New Workflows

  1. Create new .yml file in .github/workflows/
  2. Follow GitHub Actions syntax
  3. Commit and push
  4. Workflow will be available automatically

📝 Workflow Files

  • deploy-trading-bridge.yml - Main deployment workflow
  • auto-deploy-vps.yml - VPS deployment automation
  • test-and-validate.yml - Code validation and testing

Benefits

  • Automated Testing - Catch errors before deployment
  • Security Checks - Prevent sensitive data leaks
  • Deployment Packages - Ready-to-deploy artifacts
  • Documentation - Auto-generated deployment instructions
  • Consistency - Same process every time

🆘 Troubleshooting

Workflow not running?

  • Check workflow file syntax
  • Verify triggers are correct
  • Check GitHub Actions is enabled

Validation failing?

  • Check error messages in Actions tab
  • Verify all required files exist
  • Check for syntax errors

Deployment issues?

  • Review deployment instructions in workflow summary
  • Check VPS connection
  • Verify all dependencies installed

All workflows are active and will run automatically on push!