mirror of
https://github.com/karpathy/nanochat.git
synced 2026-05-18 05:37:35 +00:00
Deploys to EC2 on push to master when UI/server files change. Uses appleboy/ssh-action with stored secrets. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
31 lines
750 B
YAML
31 lines
750 B
YAML
name: Deploy samosaChaat to EC2
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
paths:
|
|
- 'nanochat/ui.html'
|
|
- 'nanochat/logo.svg'
|
|
- 'scripts/chat_web.py'
|
|
- 'scripts/chat_cli.py'
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Deploy to EC2
|
|
uses: appleboy/ssh-action@v1
|
|
with:
|
|
host: ${{ secrets.EC2_HOST }}
|
|
username: ubuntu
|
|
key: ${{ secrets.EC2_SSH_KEY }}
|
|
script: |
|
|
cd /home/ubuntu/nanochat
|
|
git fetch origin master
|
|
git reset --hard origin/master
|
|
sudo systemctl restart samosachaat.service
|
|
echo "Deploy complete - samosaChaat restarted"
|