Skip to content

Commit 141010d

Browse files
MichaelBlueGenevaclaude
andcommitted
Add GitHub Actions auto-deploy workflow for Render
- Added .github/workflows/deploy.yml for automatic deployment - Updated CLAUDE.md with deployment documentation - Workflow triggers on main branch pushes and validates before deploy 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent cf0b745 commit 141010d

2 files changed

Lines changed: 63 additions & 1 deletion

File tree

.github/workflows/deploy.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Deploy to Render
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout code
15+
uses: actions/checkout@v4
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: '3.11'
21+
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install -r requirements.txt
26+
27+
- name: Run tests (if any)
28+
run: |
29+
# Add your test commands here if you have tests
30+
python -c "import app; print('App imports successfully')"
31+
32+
- name: Deploy to Render
33+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
34+
uses: johnbeynon/render-deploy-action@v0.0.8
35+
with:
36+
service-id: ${{ secrets.RENDER_SERVICE_ID }}
37+
api-key: ${{ secrets.RENDER_API_KEY }}

CLAUDE.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,29 @@ curl -X POST http://127.0.0.1:5001/simulate -H "Content-Type: application/json"
5656
## Tech Stack
5757
- Backend: Flask 2.3.3, Python
5858
- Frontend: Vanilla JavaScript, Chart.js, CSS Grid/Flexbox
59-
- No database required (in-memory data)
59+
- No database required (in-memory data)
60+
61+
## Deployment
62+
63+
### GitHub Actions Auto-Deploy to Render
64+
65+
The repository includes a GitHub Action workflow (`.github/workflows/deploy.yml`) for automatic deployment to Render.
66+
67+
#### Required GitHub Secrets
68+
69+
Configure these secrets in your GitHub repository settings (Settings > Secrets and variables > Actions):
70+
71+
1. **RENDER_SERVICE_ID**: Your Render service ID
72+
- Found in your Render dashboard URL: `https://dashboard.render.com/web/srv-XXXXXXXXX`
73+
- The service ID is the part after `srv-`
74+
75+
2. **RENDER_API_KEY**: Your Render API key
76+
- Generate at: https://dashboard.render.com/account/api-keys
77+
- Choose "Full Access" scope
78+
79+
#### How it works
80+
81+
- Triggers on pushes to the `main` branch
82+
- Runs tests and validation
83+
- Automatically deploys to Render if all checks pass
84+
- Only deploys from the main branch for security

0 commit comments

Comments
 (0)