swith do ip
Some checks failed
Deploy Bot on NAS / deploy (push) Has been cancelled

This commit is contained in:
Elewyn 2026-04-30 16:12:11 +02:00
parent e4a38d7853
commit cd81d299ab
2 changed files with 13 additions and 11 deletions

View file

@ -31,26 +31,20 @@ jobs:
mkdir -p ~/.ssh
echo "${{ secrets.NAS_SSH_KEY }}" > ~/.ssh/id_deploy
chmod 600 ~/.ssh/id_deploy
cat >> ~/.ssh/config << 'EOF'
Host nas
HostName 192.168.1.208
User Elewyn
IdentityFile ~/.ssh/id_deploy
StrictHostKeyChecking no
EOF
- name: Sync files to NAS
run: |
rsync -av --delete \
-e "ssh -i ~/.ssh/id_deploy -o StrictHostKeyChecking=no" \
--exclude='.git' \
--exclude='.env' \
--exclude='data/' \
--exclude='screenshots/' \
--exclude='logs/' \
./ nas:${{ env.DEPLOY_PATH }}/
./ Elewyn@192.168.1.208:${{ env.DEPLOY_PATH }}/
- name: Restart bot on NAS
run: |
ssh nas "cd ${{ env.DEPLOY_PATH }} && \
docker compose down || true && \
docker compose up --build -d"
ssh -i ~/.ssh/id_deploy -o StrictHostKeyChecking=no \
Elewyn@192.168.1.208 \
"cd ${{ env.DEPLOY_PATH }} && docker compose down || true && docker compose up --build -d"

8
.gitignore vendored Normal file
View file

@ -0,0 +1,8 @@
.env
data/
screenshots/
logs/
__pycache__/
*.pyc
*.pyo
*.db