mirror of
https://github.com/pezkuwichain/pezkuwi-subquery.git
synced 2026-04-22 01:57:58 +00:00
7dac1598dc
git pull was silently failing when VPS had local modifications, causing deploys to not actually update the code.
26 lines
769 B
YAML
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
|