Some checks failed
☁️ Cloudflare Deployment / Deploy Workers (push) Has been cancelled
🚂 Railway Deployment / Deploy to Railway (push) Has been cancelled
🌐 Unified Multi-Platform Deployment / 🔍 Prepare (push) Has been cancelled
▲ Vercel Deployment / Deploy to Vercel (push) Has been cancelled
🌐 Unified Multi-Platform Deployment / 🚀 Deploy all platforms (push) Has been cancelled
🔒 Security Scanning / 📦 Dependencies (push) Failing after 40s
🔒 Security Scanning / 🔐 Secrets (push) Failing after 1m34s
💾 Automated Backup / 📦 Backup infrastructure (push) Failing after 45s
🏥 Infrastructure Health Monitoring / 🔍 Health Check (push) Successful in 2s
55 lines
1.5 KiB
YAML
55 lines
1.5 KiB
YAML
name: 🚂 Railway Deployment
|
|
|
|
on:
|
|
push:
|
|
branches: [main, develop]
|
|
pull_request:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
inputs:
|
|
environment:
|
|
description: 'Deployment environment'
|
|
required: true
|
|
default: 'production'
|
|
type: choice
|
|
options: [production, staging, preview]
|
|
|
|
jobs:
|
|
deploy:
|
|
name: Deploy to Railway
|
|
runs-on: ubuntu-latest
|
|
environment: ${{ github.event.inputs.environment || 'production' }}
|
|
|
|
steps:
|
|
- name: 📥 Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: 🔧 Setup Node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
cache: 'npm'
|
|
|
|
- name: 📦 Install Railway CLI
|
|
run: npm install -g @railway/cli
|
|
|
|
- name: 🏗️ Build
|
|
run: |
|
|
if [ -f package.json ]; then
|
|
npm ci
|
|
npm run build --if-present
|
|
fi
|
|
|
|
- name: 🚀 Deploy
|
|
run: |
|
|
railway link ${{ secrets.RAILWAY_PROJECT_ID }}
|
|
railway up --service blackroad-private --environment ${{ github.event.inputs.environment || 'production' }}
|
|
env:
|
|
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
|
|
|
|
- name: 📊 Summary
|
|
run: |
|
|
echo "### 🚂 Railway Deployment Success" >> $GITHUB_STEP_SUMMARY
|
|
echo "- **Environment**: ${{ github.event.inputs.environment || 'production' }}" >> $GITHUB_STEP_SUMMARY
|
|
echo "- **Branch**: ${{ github.ref_name }}" >> $GITHUB_STEP_SUMMARY
|