Some checks failed
CI / lint-and-test (push) Has been cancelled
Phase 1 - Architecture Documentation: - Add Architecture section with Mermaid flowchart to README - Create docs/DATABASE_SCHEMA.md with full ERD Phase 2 - CI/CD: - Add CI badge to README - Create .gitea/workflows/ci.yml for linting and tests - Create .gitea/workflows/deploy-staging.yml - Create .gitea/workflows/deploy-production.yml Phase 3 - Operational Scripts: - Create scripts/logs.sh for docker compose log following - Create scripts/run-detached.sh with health check loop - Create scripts/etl/toronto.sh for Toronto data pipeline - Add Makefile targets: logs, run-detached, etl-toronto Phase 4 - Runbooks: - Create docs/runbooks/adding-dashboard.md - Create docs/runbooks/deployment.md Phase 5 - Hygiene: - Create MIT LICENSE file Phase 6 - Production: - Add live demo link to README (leodata.science) Closes #78, #79, #80, #81, #82, #83, #84, #85, #86, #87, #88, #89, #91 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
45 lines
1.1 KiB
YAML
45 lines
1.1 KiB
YAML
name: Deploy to Staging
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- staging
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Deploy to Staging Server
|
|
uses: appleboy/ssh-action@v1.0.3
|
|
with:
|
|
host: ${{ secrets.STAGING_HOST }}
|
|
username: ${{ secrets.STAGING_USER }}
|
|
key: ${{ secrets.STAGING_SSH_KEY }}
|
|
script: |
|
|
set -euo pipefail
|
|
|
|
cd ~/apps/personal-portfolio
|
|
|
|
echo "Pulling latest changes..."
|
|
git fetch origin staging
|
|
git reset --hard origin/staging
|
|
|
|
echo "Activating virtual environment..."
|
|
source .venv/bin/activate
|
|
|
|
echo "Installing dependencies..."
|
|
pip install -r requirements.txt --quiet
|
|
|
|
echo "Running dbt models..."
|
|
cd dbt && dbt run --profiles-dir . && cd ..
|
|
|
|
echo "Restarting application..."
|
|
docker compose down
|
|
docker compose up -d
|
|
|
|
echo "Waiting for health check..."
|
|
sleep 10
|
|
curl -f http://localhost:8050/health || exit 1
|
|
|
|
echo "Staging deployment complete!"
|