GitHub Actions — CI/CD¶
Overview¶
Lenzeye uses GitHub Actions for two pipelines:
- Application deployment — push to
maintriggers Render auto-deploy - Documentation deployment — push to docs repo
maintriggers MkDocs build and GitHub Pages deploy
Application Pipeline (Lenzeye_Deployment repo)¶
Trigger¶
yaml
on:
push:
branches: [main]
What Happens¶
- GitHub push to
main - Render receives webhook from GitHub
- Render pulls latest code
- Runs
pip install -r requirements.txt - Restarts Gunicorn worker with new code
No custom GitHub Actions workflow file is needed for the application — Render handles deployment directly via GitHub integration.
Documentation Pipeline (Lenzeye_Documentation repo)¶
Workflow File: .github/workflows/deploy-docs.yml¶
```yaml name: Deploy Docs
on: push: branches: [main]
jobs: deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: pip install mkdocs-material
- name: Build and deploy
run: mkdocs gh-deploy --force
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
What Happens¶
- Push to
mainin docs repo - GitHub Actions runner checks out code
- Installs
mkdocs-material - Runs
mkdocs gh-deploy— builds static site and pushes togh-pagesbranch - GitHub Pages serves from
gh-pagesbranch
Branch Strategy¶
| Branch | Purpose |
|---|---|
main |
Production-ready code. Deploy-on-push. |
dev |
Active development. No auto-deploy. |
feature/* |
Feature branches. PR into dev. |
Recommended Workflow¶
feature/your-feature → PR → dev → tested → PR → main → auto-deploy
Never push directly to main without testing on dev first.
Manual Deploy (Emergency)¶
If auto-deploy fails or you need to force a deploy:
- Render Dashboard → Web Service → Manual Deploy → Deploy latest commit
- Or merge any commit to
main— Render will pick it up
Secrets Required¶
For documentation deployment, GITHUB_TOKEN is automatically provided by GitHub Actions — no manual secret setup needed.
For application deployment, no secrets are needed in GitHub — all secrets are set in Render's environment dashboard.
TL;DR¶
App deploy: Push to main → Render auto-deploys via GitHub integration. No custom Actions workflow needed.
Docs deploy: Push to docs main → GitHub Actions runs mkdocs gh-deploy → GitHub Pages updated.
Branch strategy: feature/* → dev → main. Never push directly to main.