Skip to content

Commit 10d72ca

Browse files
committed
added usage example to the README
1 parent eb2ad13 commit 10d72ca

1 file changed

Lines changed: 33 additions & 1 deletion

File tree

README.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,35 @@
11
# graph-deploy
22

3-
Graph Deploy is a github action that deploys a subgraph to the graph protocol to index Ethereum and IPFS as a graphql
3+
GitHub action that deploys a subgraph to the graph protocol to index Ethereum and IPFS as graphql
4+
5+
Set your thegraph.com access token as a github secret in your repository, and add `.github/workflows/graph.yml`:
6+
7+
```yml
8+
name: Deploy Graph
9+
10+
on:
11+
push:
12+
branches: main
13+
14+
jobs:
15+
deploy:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Install node
20+
uses: actions/setup-node@v1
21+
with:
22+
node-version: 14
23+
- name: Install
24+
run: yarn --frozen-lockfile
25+
- name: Codegen
26+
run: yarn codegen
27+
- name: Build
28+
run: yarn build
29+
- uses: gtaschuk/graph-deploy@v0.1.0
30+
with:
31+
graph_access_token: ${{secrets.GRAPH_ACCESS_TOKEN}}
32+
graph_subgraph_name: "your-subgraph-name"
33+
graph_account: "your-github-name-or-organization"
34+
graph_config_file: "subgraph.yml"
35+
```

0 commit comments

Comments
 (0)