Files
pezkuwi-subquery/.github/workflows/deploy-vps.yml
T
pezkuwichain 7dac1598dc fix: deploy workflow stash local changes before git pull
git pull was silently failing when VPS had local modifications,
causing deploys to not actually update the code.
2026-03-10 00:53:05 +03:00

26 lines
769 B
YAML

name: Deploy to VPS
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Deploy via SSH
uses: appleboy/ssh-action@v1
with:
host: ${{ secrets.VPS_HOST }}
username: root
key: ${{ secrets.VPS_SSH_KEY }}
script: |
set -e
cd /opt/subquery
git stash --include-untracked || true
git pull origin main
yarn install --frozen-lockfile
./node_modules/.bin/subql codegen pezkuwi-governance.yaml
./node_modules/.bin/subql build pezkuwi.yaml
docker compose -f docker-compose.prod.yml build
docker compose -f docker-compose.prod.yml up -d
git stash pop || true