Skip to content

Commit

Permalink
[SUBGRAPH] Graph studio deployment (#1983)
Browse files Browse the repository at this point in the history
* added deploy to graphstudio

* ci handler deploy to graphstudio

* fixed ci option typo

* added eth-mainnet to supported networks

* set version label as commit hash

* fixed shellcheck

* ignore shellcheck 2181
  • Loading branch information
mmd-afegbua authored Jul 12, 2024
1 parent 2682cce commit 72eab9f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/call.deploy-subgraph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
inputs:
vendor:
required: true
description: "Where to deploy subgraph to; superfluid, goldsky or airstack"
description: "Where to deploy subgraph to; superfluid, goldsky, graph or airstack"
type: string
deployment_env:
required: true
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/handler.deploy-production-subgraphs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ on:
inputs:
vendor:
required: true
description: "Where to deploy subgraph to; one of `superfluid`, `goldsky` or `airstack`"
description: "Where to deploy subgraph to; one of `superfluid`, `goldsky`, `graph` or `airstack`"
default: "superfluid"
type: choice
options:
- superfluid
- goldsky
- graph
- airstack
deployment_env:
required: true
Expand Down
13 changes: 6 additions & 7 deletions packages/subgraph/tasks/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ SUPPORTED_VENDORS=( "graph" "satsuma" "superfluid" "goldsky" "airstack" )
# list of supported networks by vendor

# shellcheck disable=SC2034,SC2207
GRAPH_NETWORKS=( $($JQ -r .[] ./hosted-service-networks.json) ) || exit 1
GRAPH_NETWORKS=( "polygon-mainnet" "eth-mainnet" )
# shellcheck disable=SC2034
SATSUMA_NETWORKS=( "polygon-mainnet" "xdai-mainnet" "eth-mainnet" "eth-sepolia" "optimism-mainnet" "base-mainnet")
# shellcheck disable=SC2034
Expand Down Expand Up @@ -77,15 +77,14 @@ deploy_to_graph() {
)

local graphNetwork="${legacyNetworkNames[$network]:-$network}"
local subgraphName="superfluid-finance/protocol-$DEPLOYMENT_ENV-$graphNetwork"
local subgraphName="protocol-$DEPLOYMENT_ENV-$graphNetwork"

echo "********* Deploying $network subgraph $subgraphName to The Graph (hosted service). **********"

$GRAPH_CLI deploy \
--product hosted-service \
"$subgraphName" \
--node https://api.thegraph.com/deploy/ \
--ipfs https://api.thegraph.com/ipfs \
--deploy-key "$THE_GRAPH_ACCESS_TOKEN"
--studio "$subgraphName" \
--deploy-key "$THE_GRAPH_ACCESS_TOKEN" \
--version-label "$VERSION_LABEL"
}

deploy_to_satsuma() {
Expand Down

0 comments on commit 72eab9f

Please sign in to comment.