Skip to content

Commit 3f73e42

Browse files
committed
refactor: change trigger event to
1 parent 16eda19 commit 3f73e42

File tree

2 files changed

+41
-34
lines changed

2 files changed

+41
-34
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Deploy Subgraph - Live
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
network:
7+
description: The network to deploy the subgraph to
8+
required: true
9+
default: "goerli"
10+
type: choice
11+
options:
12+
- mainnet
13+
- goerli
14+
15+
jobs:
16+
deploy-production:
17+
runs-on: ubuntu-latest
18+
environment: production
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v3
22+
23+
- name: Set up Node.js
24+
uses: actions/setup-node@v2
25+
with:
26+
node-version: 16
27+
28+
- name: Install dependencies
29+
run: yarn install
30+
31+
- name: Build subgraph
32+
run: |
33+
export NETWORK_NAME=${{ inputs.network }}
34+
yarn codegen
35+
yarn build
36+
37+
- name: Authenticate with TheGraph
38+
run: yarn graph auth https://api.thegraph.com/deploy/ ${{ secrets.SUBGRAPH_AUTH_TOKEN }}
39+
40+
- name: Deploy subgraph
41+
run: yarn deploy

.github/workflows/deploy.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)