File tree Expand file tree Collapse file tree 2 files changed +72
-0
lines changed
Expand file tree Collapse file tree 2 files changed +72
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy DO Indexer
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ workflow_dispatch :
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v4
14+ - uses : actions/setup-node@v4
15+ with :
16+ node-version : 20
17+ - name : Install dependencies
18+ run : npm ci
19+ - name : Test build
20+ run : npm run build
21+ deploy-indexer :
22+ needs : build
23+ runs-on : ubuntu-latest
24+ steps :
25+ - uses : actions/checkout@v4
26+ - name : Deploy to production
27+ uses : appleboy/ssh-action@master
28+ with :
29+ host : ${{ secrets.DO_INDEXER_IP }}
30+ username : ${{ secrets.DO_USER }}
31+ key : ${{ secrets.DO_SSH_KEY }}
32+ script : |
33+ export N_PREFIX="$HOME/n"; [[ :$PATH: == *":$N_PREFIX/bin:"* ]] || PATH+=":$N_PREFIX/bin"
34+ cd grants-stack-indexer
35+ git fetch origin main
36+ git reset --hard origin/main
37+ npm install && npm run build
38+ pm2 reload indexer
Original file line number Diff line number Diff line change 1+ name : Deploy DO Web
2+
3+ on : workflow_dispatch
4+
5+ jobs :
6+ build :
7+ runs-on : ubuntu-latest
8+ steps :
9+ - uses : actions/checkout@v4
10+ - uses : actions/setup-node@v4
11+ with :
12+ node-version : 20
13+ - name : Install dependencies
14+ run : npm ci
15+ - name : Test build
16+ run : npm run build
17+ deploy-indexer :
18+ needs : build
19+ runs-on : ubuntu-latest
20+ steps :
21+ - uses : actions/checkout@v4
22+ - name : Deploy to production
23+ uses : appleboy/ssh-action@master
24+ with :
25+ host : ${{ secrets.DO_WEB_IP }}
26+ username : ${{ secrets.DO_USER }}
27+ key : ${{ secrets.DO_SSH_KEY }}
28+ script : |
29+ export N_PREFIX="$HOME/n"; [[ :$PATH: == *":$N_PREFIX/bin:"* ]] || PATH+=":$N_PREFIX/bin"
30+ cd grants-stack-indexer
31+ git fetch origin main
32+ git reset --hard origin/main
33+ npm install && npm run build
34+ pm2 reload web
You can’t perform that action at this time.
0 commit comments