Files
pezkuwi-subquery/.github/workflows/deploy-vps.yml
T
pezkuwichain d270504c9a fix: handle pruned RPC state in SubQuery node
Substrate nodes prune historical state by default (~256 blocks).
When SubQuery restarts and tries to fetch runtime version for old
blocks, it crashes with "State already discarded". This patch adds
a fallback to current runtime version when historical state is
unavailable, preventing crash loops on pruned RPC endpoints.

Also removes --pull from deploy workflow to avoid unnecessary
full rebuilds on every push.
2026-02-19 02:22:52 +03:00

20 lines
496 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: |
cd /opt/subquery
git pull origin main
docker compose -f docker-compose.prod.yml build
docker compose -f docker-compose.prod.yml up -d