Skip to content

Handler | Deploy Production Subgraph #232

Handler | Deploy Production Subgraph

Handler | Deploy Production Subgraph #232

# Handler Workflow Summary
# This handler workflow file can be used to deploy our subgraphs.
# It can be used to one network, or all networks to either
# self-hosted nodes, the Graph Hosted Service and Satsuma.
name: Handler | Deploy Production Subgraph
env:
GITHUB_TOKEN: ${{ secrets.CI_GITHUB_TOKEN }}
on:
workflow_dispatch:
inputs:
vendor:
required: true
description: "Where to deploy subgraph to; one of `superfluid`, `graph`, `goldsky` or `airstack`"
default: "superfluid"
type: choice
options:
- superfluid
- graph
- goldsky
- airstack
deployment_env:
required: true
description: 'The subgraph deployment env: v1, dev, feature.'
type: choice
default: v1
options:
- v1
- dev
- feature
network:
required: true
type: string
description: 'The canonical name of the network you want to deploy to (e.g. `eth-mainnet`) or `all` for all networks.'
jobs:
build-and-test-local-subgraph:
uses: ./.github/workflows/call.test-local-subgraph.yml
name: Run Subgraph Unit and Integration Tests
build-and-test-local-subgraph-against-previous-sdk-core-releases:
uses: ./.github/workflows/call.test-subgraph-on-previous-sdk-core-versions.yml
name: Test Local Subgraph against SDK-Core previous and current releases
with:
subgraph-release: ''
subgraph-endpoint: http://localhost:8000/subgraphs/name/superfluid-test
deploy-subgraph:
uses: ./.github/workflows/call.deploy-subgraph.yml
needs: [
build-and-test-local-subgraph
, build-and-test-local-subgraph-against-previous-sdk-core-releases
]
name: Deploy graph to ${{ github.event.inputs.vendor }} vendor
with:
deployment_env: ${{ github.event.inputs.deployment_env }}
network: ${{ github.event.inputs.network }}
vendor: ${{ github.event.inputs.vendor }}
secrets:
THE_GRAPH_ACCESS_TOKEN: ${{ secrets.THE_GRAPH_ACCESS_TOKEN }}
SATSUMA_DEPLOY_KEY: ${{ secrets.SATSUMA_DEPLOY_KEY }}
SUBGRAPH_URL_TEMPLATE: ${{ secrets.SUBGRAPH_URL_TEMPLATE }}
SUPERFLUID_IPFS_API: ${{ secrets.SUPERFLUID_IPFS_API }}
GOLDSKY_API_KEY: ${{ secrets.GOLDSKY_API_KEY }}
AIRSTACK_API_KEY: ${{ secrets.AIRSTACK_API_KEY }}