Skip to content

Commit f9d2608

Browse files
committed
docs: Add thegraph network instructions
1 parent 7f1281c commit f9d2608

File tree

1 file changed

+30
-17
lines changed

1 file changed

+30
-17
lines changed

README.md

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,31 @@ Check how to export handlers with [Matchstick - Test Coverage documentation](htt
5555

5656
### Thegraph network
5757

58-
To deploy this subgraph on Thegraph network:
58+
#### CI/CD deployment (recommended)
5959

60-
1. Set up your environment variables in `.env` file:
60+
The recommended approach to deploy the subgraph on The Graph network is to use
61+
the dedicated Github Actions workflow:
62+
63+
1. Set up the Github environment for the target network (e.g. `arbitrum`) with
64+
the required environnment variables and secrets:
65+
- `vars.SUBGRAPH_SLUG`
66+
- `secrets.SUBGRAPH_DEPLOY_KEY`
67+
- `vars.SUBGRAPH_NETWORK_NAME`
68+
- `VERSION_LABEL` is a workfow input
69+
70+
2. Trigger the deployment Action on Github and specify the `version_label` input.
71+
72+
#### Manual deployment
73+
74+
To deploy this subgraph on Thegraph network manually:
75+
76+
1. Set up environment variables in `.env` file:
6177

6278
```bash
63-
SUBGRAPH_SLUG=your-subgraph-slug
64-
SUBGRAPH_DEPLOY_KEY=your-deploy-key
65-
SUBGRAPH_NETWORK_NAME=your-network-name
66-
VERSION_LABEL=your-version-label
79+
SUBGRAPH_SLUG=<subgraph-slug>
80+
SUBGRAPH_DEPLOY_KEY=<deploy-key>
81+
SUBGRAPH_NETWORK_NAME=<network-name>
82+
VERSION_LABEL=<version-label>
6783
```
6884

6985
2. Deploy using the npm script:
@@ -72,20 +88,17 @@ To deploy this subgraph on Thegraph network:
7288
npm run deploy-studio
7389
```
7490

75-
### Self-Hosted Subgraph Deployment Process
76-
77-
78-
## Docker subgraph deployer
91+
### Self-hosted subgraph deployment
7992

80-
The subgraph is deploy via a generated Docker image.
93+
The subgraph is deployed via a generated Docker image.
8194

82-
### Build image
95+
#### Build image
8396

8497
```sh
8598
docker build -f docker/Dockerfile . -t poco-subgraph-deployer
8699
```
87100

88-
### Usage
101+
#### Usage
89102

90103
env:
91104

@@ -101,13 +114,13 @@ docker run --rm \
101114
poco-subgraph-deployer
102115
```
103116

104-
## Deployment configuration
117+
### Deployment configuration
105118

106-
### Jenkins pipeline deployment
119+
#### Jenkins pipeline deployment
107120

108121
The project uses a Jenkins pipeline for automated deployment of the subgraph. The deployment can be triggered through Jenkins with interactive parameter selection.
109122

110-
#### Available Parameters
123+
##### Available Parameters
111124

112125
- **Network**: Choose the target blockchain network
113126
- **Environment**: Select deployment environment
@@ -117,7 +130,7 @@ The project uses a Jenkins pipeline for automated deployment of the subgraph. Th
117130
- **Version Label**: Specify the version of the deployment (e.g., `v1.0.0`)
118131
- **Subgraph Name**: Name of the subgraph (default: `poco-v5`)
119132

120-
#### Environment-specific Configurations
133+
##### Environment-specific Configurations
121134

122135
Each environment has specific host configurations:
123136

0 commit comments

Comments
 (0)