mirror of
https://github.com/pezkuwichain/pezkuwi-subquery.git
synced 2026-10-20 18:56:24 +00:00
The explorer at explorer.pezkuwichain.io needs transfer history for Zagros Asset Hub. It runs on the explorer host next to its own archive node, so the manifest points at 127.0.0.1:9955 and the compose file binds everything locally with memory limits and no published ports. deploy-vps now ignores these files: a change to the Zagros indexer must not rebuild or restart the mainnet stack and its bots on the indexer host.
38 lines
1.4 KiB
YAML
38 lines
1.4 KiB
YAML
name: Deploy to VPS
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
# The Zagros history indexer runs on the explorer host, not here.
|
|
paths-ignore:
|
|
- zagros-assethub.yaml
|
|
- docker-compose.zagros.yml
|
|
- ops/zagros/**
|
|
|
|
concurrency:
|
|
group: deploy-vps
|
|
cancel-in-progress: false
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
# The deploy key is pinned on the host to ops/host/subquery-deploy-ssh
|
|
# (authorized_keys restrict,command=): the commit SHA is its only input.
|
|
# subquery-deploy, run through sudo, brings /opt/subquery to exactly that
|
|
# commit of main, keeps the host's local edits, and rebuilds the stack.
|
|
- name: Deploy via SSH
|
|
env:
|
|
DEPLOY_KEY: ${{ secrets.SUBQUERY_DEPLOY_KEY }}
|
|
# subquery1's host key, read from the host itself; any other key fails.
|
|
KNOWN_HOST: "158.220.93.26 ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINtnaMWZ0RZDD6yt+6WdtU/rpEz4pyHmo7otkbmgTpkA"
|
|
run: |
|
|
umask 077
|
|
printf '%s\n' "$DEPLOY_KEY" > "$RUNNER_TEMP/deploy_key"
|
|
printf '%s\n' "$KNOWN_HOST" > "$RUNNER_TEMP/known_hosts"
|
|
ssh -i "$RUNNER_TEMP/deploy_key" -o IdentitiesOnly=yes -o BatchMode=yes \
|
|
-o StrictHostKeyChecking=yes -o UserKnownHostsFile="$RUNNER_TEMP/known_hosts" \
|
|
subquery-deploy@158.220.93.26 "$GITHUB_SHA"
|