Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/deploy-subgraph-theGraph.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Prod Deploy theGraph Subgraph
on:
workflow_dispatch:
jobs:
deploy-subgraph:
name: Deploy subgraph workflow
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "16"

- name: Install the graph cli
run: npm install @graphprotocol/graph-cli

- name: Authenticate with prod subgraph
run: |
npx graph auth --product hosted-service ${{ secrets.PROD_SUBGRAPH_API_KEY }}

- name: Install subgraph dependencies
working-directory: ./subgraph
run: npm install

- name: Prepare for subgraph deployment
working-directory: ./subgraph
run: npm run prepare

- name: Deploy subgraph
working-directory: ./subgraph
run: npm run deploy-theGraph
3 changes: 2 additions & 1 deletion subgraph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"prepare-dev": "yarn prepare-dev:schema && yarn prepare-dev:codegen && yarn prepare-dev:compile",
"deploy-dev": "graph deploy --node https://api.graph-eu.p2pify.com/765768b776199f59bb7f1bf37253e73f/deploy --ipfs https://api.graph-eu.p2pify.com/765768b776199f59bb7f1bf37253e73f/ipfs forta-dev",
"deploy": "graph deploy -l v0.0.1 --node https://api.graph-eu.p2pify.com/3e3485fa2703678549290ce52f45ef9c/deploy --ipfs https://api.graph-eu.p2pify.com/3e3485fa2703678549290ce52f45ef9c/ipfs forta-b",
"deploy-theGraph": "graph deploy --network matic --node https://api.thegraph.com/deploy/ forta-network/forta-network",
"create-local": "graph create --node http://localhost:8020/ forta-network/forta-network",
"remove-local": "graph remove --node http://localhost:8020/ forta-network/forta-network",
"deploy-local": "graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 forta-network/forta-network",
Expand All @@ -25,4 +26,4 @@
"matchstick-as": "^0.5.0",
"source-map-support": "^0.5.21"
}
}
}