Skip to content

feat: added dataversion to logging (#637) #12

feat: added dataversion to logging (#637)

feat: added dataversion to logging (#637) #12

name: Deploy DO Indexer
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Test build
run: npm run build
deploy-indexer:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Deploy to production
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.DO_INDEXER_IP }}
username: ${{ secrets.DO_USER }}
key: ${{ secrets.DO_SSH_KEY }}
script: |
export N_PREFIX="$HOME/n"; [[ :$PATH: == *":$N_PREFIX/bin:"* ]] || PATH+=":$N_PREFIX/bin"
cd grants-stack-indexer
git fetch origin main
git reset --hard origin/main
npm install && npm run build
pm2 reload indexer