Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: baseline settings and subgraph workflow #34

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
chore: subgraph workflow
jaybuidl authored Feb 20, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 9e623808523d31169592b45132d792ee0f8cb612
53 changes: 53 additions & 0 deletions .github/workflows/deploy-subgraph.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Deploy Subgraph

on:
workflow_dispatch:
inputs:
network:
description: The network to deploy the subgraph to
default: 'gnosis'
required: true
type: choice
options:
- gnosis
- goerli
subgraph_name:
description: The subgraph project name typically as [account]/[project]-[network]
default: kleros/moderate-gnosis
required: true
environment:
description: 'The environment to deploy to'
default: 'production'
required: true
type: environment

jobs:
buildAndDeploy:
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 16

- name: Install dependencies
run: yarn install

- name: Build subgraph
run: |
yarn graph codegen
yarn graph build --network ${{ inputs.network }}
working-directory: subgraph

- name: Authenticate with TheGraph
run: yarn graph auth --product hosted-service "${{ secrets.SUBGRAPH_AUTH_TOKEN }}"
working-directory: subgraph

- name: Deploy subgraph
run: yarn graph deploy --product hosted-service --network "${{ inputs.network }}" "${{ inputs.subgraph_name }}"
working-directory: subgraph