mirror of
https://github.com/blackboxprogramming/BlackRoad-Operating-System.git
synced 2026-03-17 08:57:15 -05:00
- Add Railway configuration (railway.toml) - Add GitHub Actions workflows - Railway deployment automation - Python/Node.js testing - Health check monitoring - Add GitHub templates (CODEOWNERS, PR template) - Add requirements files if missing - Standardize deployment across all services This ensures consistent deployment patterns across the entire BlackRoad OS infrastructure. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
79 lines
2.2 KiB
YAML
79 lines
2.2 KiB
YAML
name: Deploy via Orchestrator
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- master
|
|
paths:
|
|
- 'blackroad-*.py'
|
|
workflow_dispatch:
|
|
inputs:
|
|
service_name:
|
|
description: 'Service to deploy'
|
|
required: true
|
|
type: string
|
|
category:
|
|
description: 'Category to deploy (or "all")'
|
|
required: false
|
|
type: string
|
|
default: 'core'
|
|
|
|
jobs:
|
|
deploy-single:
|
|
if: github.event_name == 'workflow_dispatch' && github.event.inputs.service_name != ''
|
|
runs-on: ubuntu-latest
|
|
name: Deploy Single Service
|
|
|
|
steps:
|
|
- name: Deploy service
|
|
run: |
|
|
curl -X POST ${{ secrets.ORCHESTRATOR_URL }}/deploy/${{ github.event.inputs.service_name }} \
|
|
-H "Content-Type: application/json"
|
|
|
|
deploy-category:
|
|
if: github.event_name == 'workflow_dispatch' && github.event.inputs.service_name == ''
|
|
runs-on: ubuntu-latest
|
|
name: Deploy Category
|
|
|
|
steps:
|
|
- name: Deploy category
|
|
run: |
|
|
curl -X POST "${{ secrets.ORCHESTRATOR_URL }}/deploy/all?category=${{ github.event.inputs.category }}" \
|
|
-H "Content-Type: application/json"
|
|
|
|
auto-deploy:
|
|
if: github.event_name == 'push'
|
|
runs-on: ubuntu-latest
|
|
name: Auto-deploy Changed Services
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 2
|
|
|
|
- name: Get changed files
|
|
id: changed
|
|
run: |
|
|
echo "files=$(git diff --name-only HEAD^ HEAD | grep 'blackroad-.*\.py' | sed 's/\.py$//' | tr '\n' ' ')" >> $GITHUB_OUTPUT
|
|
|
|
- name: Deploy changed services
|
|
if: steps.changed.outputs.files != ''
|
|
run: |
|
|
for service in ${{ steps.changed.outputs.files }}; do
|
|
echo "Deploying $service..."
|
|
curl -X POST ${{ secrets.ORCHESTRATOR_URL }}/deploy/$service \
|
|
-H "Content-Type: application/json" || echo "Failed to deploy $service"
|
|
done
|
|
|
|
notify:
|
|
needs: [deploy-single, deploy-category, auto-deploy]
|
|
if: always()
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Deployment status
|
|
run: |
|
|
echo "Deployment workflow completed"
|
|
echo "Check orchestrator dashboard: ${{ secrets.ORCHESTRATOR_URL }}/dashboard"
|