-
Notifications
You must be signed in to change notification settings - Fork 11
35 lines (30 loc) · 1.27 KB
/
deploy-goerli-subgraph.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Testnet Subgraph (Goerli)
on:
push:
tags:
- v*
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
# Install commands
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
registry-url: https://registry.npmjs.org
- name: yarn add ts-node
run: yarn add ts-node
- name: yarn install
run: yarn install
env:
NODE_AUTH_TOKEN: ${{secrets.graphprotocol_npm_token}}
# Run scripts
- name: Prepare addresses goerli
run: ./node_modules/.bin/ts-node config/goerliAddressScript.ts && ./node_modules/.bin/mustache ./config/generatedAddresses.json ./config/addresses.template.ts > ./config/addresses.ts
- name: Prepare rinkeby
run: ./node_modules/.bin/mustache ./config/generatedAddresses.json subgraph.template.yaml > subgraph.yaml && ./node_modules/@graphprotocol/graph-cli/bin/run codegen --output-dir src/types/
- name: Deploy to testnet rinkeby
run: ./node_modules/@graphprotocol/graph-cli/bin/run deploy graphprotocol/graph-network-analytics-goerli --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/ --access-token ${{secrets.access_token}}