This commit is contained in:
parent
e4a38d7853
commit
cd81d299ab
2 changed files with 13 additions and 11 deletions
|
|
@ -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
8
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
.env
|
||||
data/
|
||||
screenshots/
|
||||
logs/
|
||||
__pycache__/
|
||||
*.pyc
|
||||
*.pyo
|
||||
*.db
|
||||
Loading…
Reference in a new issue