Skip to content

Deploy Subgraph

Deploy Subgraph #9

Workflow file for this run

name: Deploy Subgraph
on:
workflow_dispatch:
inputs:
network:
description: The network to deploy the subgraph to
required: true
default: 'xdai'
type: choice
options:
- goerli
- sepolia
- xdai
- mainnet
environment:
description: The environment to deploy to
required: true
default: 'kleros-org-subgraph'
type: environment
permissions:
contents: read
jobs:
buildAndDeploy:
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@128a63446a954579617e875aaab7d2978154e969 # v2.4.0
with:
egress-policy: audit
- name: Checkout code
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0
- name: Set up Node.js
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2.5.2
with:
node-version: 16
- name: Install dependencies
run: yarn install
- name: Authenticate with TheGraph
run: yarn graph auth "${{ secrets.SUBGRAPH_AUTH_TOKEN }}" --product hosted-service
- name: Build and deploy subgraph
run: |
yarn publish:${{ inputs.network }}