ci.yml
yaml
sha256:0032d6cfa33bc3c8367436ad768e7dd0e339b4332153160247da8266cb5fa352
Merge branch 'task/version-tags-phase3-server' into dev
Human
17 days ago
| 1 | name: CI |
| 2 | |
| 3 | # Trigger on pushes to main and feature branches, and on proposals targeting main. |
| 4 | on: |
| 5 | push: |
| 6 | branches: |
| 7 | - main |
| 8 | - "feat/*" |
| 9 | - "fix/*" |
| 10 | - "chore/*" |
| 11 | pull_request: |
| 12 | branches: |
| 13 | - main |
| 14 | |
| 15 | jobs: |
| 16 | test: |
| 17 | name: Test & typecheck (Python 3.14) |
| 18 | container: python:3.14-slim |
| 19 | steps: |
| 20 | - name: Install dependencies |
| 21 | run: pip install -e ".[dev]" |
| 22 | |
| 23 | - name: Static type check |
| 24 | run: mypy musehub/ |
| 25 | |
| 26 | - name: Run tests |
| 27 | run: pytest tests/ -n auto --tb=short |
| 28 | |
| 29 | deploy: |
| 30 | name: Deploy to musehub.ai |
| 31 | container: python:3.14-slim |
| 32 | needs: |
| 33 | - test |
| 34 | # Only deploy when merging to main (not on proposals or feature branches) |
| 35 | if: "trigger == 'push' and branch == 'main'" |
| 36 | env: |
| 37 | EC2_HOST: ${{ secrets.EC2_HOST }} |
| 38 | EC2_USER: ${{ secrets.EC2_USER }} |
| 39 | EC2_SSH_KEY: ${{ secrets.EC2_SSH_KEY }} |
| 40 | steps: |
| 41 | - name: Install deploy tools |
| 42 | run: | |
| 43 | apt-get update -qq && apt-get install -y --no-install-recommends openssh-client rsync |
| 44 | |
| 45 | - name: Write SSH key |
| 46 | run: | |
| 47 | mkdir -p ~/.ssh |
| 48 | echo "$EC2_SSH_KEY" > ~/.ssh/id_deploy |
| 49 | chmod 600 ~/.ssh/id_deploy |
| 50 | ssh-keyscan -H "$EC2_HOST" >> ~/.ssh/known_hosts 2>/dev/null |
| 51 | |
| 52 | - name: Rsync code to EC2 |
| 53 | run: | |
| 54 | rsync -az --delete \ |
| 55 | --exclude='.muse' \ |
| 56 | --exclude='__pycache__' \ |
| 57 | --exclude='*.pyc' \ |
| 58 | --exclude='.env' \ |
| 59 | --exclude='docker-compose.override.yml' \ |
| 60 | -e "ssh -i ~/.ssh/id_deploy -o StrictHostKeyChecking=no" \ |
| 61 | . "$EC2_USER@$EC2_HOST:/opt/musehub/" |
| 62 | |
| 63 | - name: Reload nginx config |
| 64 | run: | |
| 65 | ssh -i ~/.ssh/id_deploy -o StrictHostKeyChecking=no "$EC2_USER@$EC2_HOST" \ |
| 66 | "sudo cp /opt/musehub/deploy/nginx-ssl.conf /etc/nginx/sites-available/musehub \ |
| 67 | && sudo nginx -t && sudo nginx -s reload" |
| 68 | |
| 69 | - name: Rebuild and restart containers |
| 70 | run: | |
| 71 | ssh -i ~/.ssh/id_deploy -o StrictHostKeyChecking=no "$EC2_USER@$EC2_HOST" \ |
| 72 | "cd /opt/musehub && docker compose up -d --build" |
| 73 | |
| 74 | - name: Wait for health check |
| 75 | run: | |
| 76 | ssh -i ~/.ssh/id_deploy -o StrictHostKeyChecking=no "$EC2_USER@$EC2_HOST" \ |
| 77 | "for i in \$(seq 1 24); do |
| 78 | STATUS=\$(docker inspect --format='{{.State.Health.Status}}' musehub 2>/dev/null) |
| 79 | echo \"Attempt \$i: \$STATUS\" |
| 80 | [ \"\$STATUS\" = 'healthy' ] && exit 0 |
| 81 | sleep 5 |
| 82 | done |
| 83 | echo 'Container did not become healthy in time' |
| 84 | docker logs musehub --tail 30 |
| 85 | exit 1" |
| 86 | |
| 87 | - name: Smoke test live site |
| 88 | run: | |
| 89 | CODE=\$(curl -s -o /dev/null -w "%{http_code}" https://musehub.ai/explore) |
| 90 | echo "https://musehub.ai/explore → \$CODE" |
| 91 | [ "\$CODE" = "200" ] || (echo "Smoke test failed" && exit 1) |
File History
10 commits
sha256:0032d6cfa33bc3c8367436ad768e7dd0e339b4332153160247da8266cb5fa352
Merge branch 'task/version-tags-phase3-server' into dev
Human
17 days ago
sha256:4669620efda9ff41c55bdefd1f7bfe1c239d468428744c84ead9957e5a003a53
merge: rescue snapshot-recovery hardening (c00aa21d) into d…
Opus 4.8
minor
⚠
30 days ago
sha256:a59da49c4611b970fc4b6ae48678ce4943261c213a07ddbd73ce9201df869b4a
fix: remove false-positive proposal_comments index drop fro…
Sonnet 4.6
patch
34 days ago
sha256:0a240d6dbff234f07d98a28a4a9a68db702f3f9ff9260196f24219bdb1c0b6f3
feat: render markdown mists as HTML with heading anchor links
Sonnet 4.6
patch
35 days ago
sha256:24a7d47486ebc4ebd1832830580e177ec6f877b48dced8c000e198cdec4ce9d6
Merge 'task/bump-version-rc12' into 'dev' — proposal: Bump …
Human
36 days ago
sha256:b9ff931d147e0114a1f17060f415b89ed551c170a91ff226c70437aa5c85f9ee
Merge 'task/bump-version-rc12' into 'dev' — proposal: Bump …
Human
36 days ago
sha256:d1122d21e73471879b460037b22c0b50fded7c423444a176f248428f75dac39c
Merge 'task/fix-issue-pagination-cursor' into 'dev' — propo…
Human
36 days ago
sha256:01e18975e73d2b3cd5b6db7929c895bef9aa6e0d4391dc5b2adfc548b41318dd
Merge 'feat/adding-debug-logs-to-staging' into 'dev' — prop…
Human
36 days ago
sha256:6b1949fc2797ca4c1936a637a4cbfec828ef56cf52398a2e74ca3c4f494e728f
fix: use wire_bytes not mpack_bytes_raw in compute_object_b…
Sonnet 4.6
patch
48 days ago
sha256:b99f2455dc346966d040133f5203297e6e3ef5803a93728a2c30568d0a0f7583
rename: delta_add → delta_upsert across wire format, models…
Sonnet 4.6
patch
50 days ago