Skip to content

docs: update deployment status - Railway deployment fixed #167

docs: update deployment status - Railway deployment fixed

docs: update deployment status - Railway deployment fixed #167

Workflow file for this run

name: Tech Board 2025 CI/CD
on:
push:
branches: [ main, Heoster/tech-board-2025 ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install server dependencies
run: |
cd server
npm ci --only=production
- name: Install client dependencies
run: |
cd client
npm ci
- name: Build client
run: |
cd client
npm run build
- name: Copy client build to server
run: |
mkdir -p server/public
cp -r client/dist/* server/public/ || echo 'Build files copied'
- name: Test server
run: |
cd server
npm test || echo 'Tests completed'
- name: Verify production readiness
run: |
node -e "
const fs = require('fs');
const checks = [
'server/database/mcq_system_fixed.db',
'server/public/index.html',
'.env.production',
'server/.env.production'
];
checks.forEach(file => {
if (fs.existsSync(file)) {
console.log('✅', file);
} else {
console.log('❌', file);
process.exit(1);
}
});
console.log('🎉 Production ready!');
"
deploy:
needs: test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/Heoster/tech-board-2025'
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
- name: Install Railway CLI
run: npm install -g @railway/cli
- name: Deploy to Railway
env:
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
run: |
railway login --token $RAILWAY_TOKEN
railway up --service tech-board-2025