Skip to content

Deploy subgraph to testing env #546

Deploy subgraph to testing env

Deploy subgraph to testing env #546

name: Deploy subgraph to testing env
on:
workflow_dispatch:
push:
branches:
- 'main'
paths:
- packages/subgraph/**
jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy subgraph
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16"
cache: "npm"
- name: Turbo Cache
id: turbo-cache
uses: actions/cache@v3
with:
path: .turbo
key: turbo-${{ runner.os }}-${{ github.sha }}
restore-keys: |
turbo-${{ runner.os }}
- run: npm ci
- id: build
run: npm run build -- --cache-dir=".turbo"
- name: Authenticate The Graph CLI
run: npx graph auth https://api.0xgraph.xyz/deploy/ ${{ secrets.ORMI_0x_GRAPH_API_KEY_TESTING }}
- name: Deploy subgraph to amoy
run: cd ./packages/subgraph && npm run deploy:testing:amoy
env:
ORMI_0x_GRAPH_API_KEY: ${{ secrets.ORMI_0x_GRAPH_API_KEY_TESTING }}
- name: Deploy subgraph to sepolia
run: cd ./packages/subgraph && npm run deploy:testing:sepolia
env:
ORMI_0x_GRAPH_API_KEY: ${{ secrets.ORMI_0x_GRAPH_API_KEY_TESTING }}