Removed dependency, Next.js build, and TypeScript caching as they were slowing down the CI pipeline instead of improving performance. Simplified workflows now run: 1. Checkout 2. Install dependencies 3. Lint & typecheck (parallel) 4. Build This should significantly reduce CI execution time by eliminating cache overhead and complexity. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
46 lines
No EOL
1.3 KiB
YAML
46 lines
No EOL
1.3 KiB
YAML
name: Deploy
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, master ]
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: self-hosted
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install dependencies
|
|
run: npm ci --prefer-offline --no-audit --no-fund
|
|
env:
|
|
NODE_OPTIONS: '--max-old-space-size=4096'
|
|
UV_THREADPOOL_SIZE: 16
|
|
|
|
- name: Build application
|
|
run: npm run build
|
|
env:
|
|
# Access YouTube API key from repository secrets
|
|
YOUTUBE_API_KEY: ${{ secrets.YOUTUBE_API_KEY }}
|
|
NODE_OPTIONS: '--max-old-space-size=4096'
|
|
NEXT_TELEMETRY_DISABLED: 1
|
|
|
|
- name: Deploy to S3 (if configured)
|
|
run: |
|
|
if [ -n "${{ secrets.AWS_ACCESS_KEY_ID }}" ]; then
|
|
echo "Deploying to S3..."
|
|
npm run deploy:s3
|
|
else
|
|
echo "AWS credentials not configured, skipping S3 deployment"
|
|
fi
|
|
env:
|
|
YOUTUBE_API_KEY: ${{ secrets.YOUTUBE_API_KEY }}
|
|
S3_BUCKET_NAME: ${{ secrets.S3_BUCKET_NAME }}
|
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
|
AWS_REGION: ${{ secrets.AWS_REGION }} |