Add deployment workflow for Linode using SSH
This commit is contained in:
parent
6cb6f1505b
commit
5c7330d138
32
.github/workdlows/deploy.yml
vendored
Normal file
32
.github/workdlows/deploy.yml
vendored
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
name: Deploy to Linode
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Deploy via SSH
|
||||||
|
uses: appleboy/ssh-action@v1.0.0
|
||||||
|
with:
|
||||||
|
host: ${{ secrets.LINODE_IP }}
|
||||||
|
username: root
|
||||||
|
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
|
script: |
|
||||||
|
echo "🚀 Pulling latest code..."
|
||||||
|
cd /root/simple-chipperfluff
|
||||||
|
git reset --hard
|
||||||
|
git pull origin main
|
||||||
|
|
||||||
|
echo "🔐 Fixing file permissions..."
|
||||||
|
chmod +x start.sh
|
||||||
|
|
||||||
|
echo "🧼 Cleaning __pycache__..."
|
||||||
|
find . -type d -name '__pycache__' -exec rm -r {} +
|
||||||
|
|
||||||
|
echo "💥 Restarting service..."
|
||||||
|
systemctl restart simple.service
|
||||||
|
|
||||||
|
echo "✅ Deploy complete!"
|
||||||
Loading…
x
Reference in New Issue
Block a user