Skip to content

Commit

Permalink
feat(ci): add Satsuma & Studio
Browse files Browse the repository at this point in the history
  • Loading branch information
julien-devatom committed May 22, 2024
1 parent 26f6fd7 commit e0f30b5
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 32 deletions.
26 changes: 0 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,32 +32,6 @@ jobs:
- name: Build subgraph
run: yarn build

deployment:
name: Deploy to TheGraph hosted service
environment:
name: Hosted Service
url: https://thegraph.com/hosted-service/subgraph/morpho-association/morpho-blue
needs: builds
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: yarn

- name: Install dependencies
run: yarn --frozen-lockfile

- name: Generate types
run: yarn codegen

- name: Deploy to the hosted service
run: yarn graph auth --product hosted-service ${{ secrets.HOSTED_SERVICE_KEY }} && yarn deploy:hs

release:
name: Create new release
runs-on: ubuntu-latest
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# trigger with new tag
name: Deploy subgraphs

on:
push:
tags:
- 'v*'

jobs:
deploy-studio:
name: Deploy to TheGraph Studio
runs-on: ubuntu-latest
environment:
name: TheGraph Studio
url: https://thegraph.com/explorer/subgraphs/8Lz789DP5VKLXumTMTgygjU2xtuzx8AhbaacgN5PYCAs
steps:
- uses: actions/checkout@v3

- name: Setup node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: yarn

- name: Install dependencies
run: yarn --frozen-lockfile

- name: Generate types
run: yarn codegen

- name: Deploy to the studio
run: |
yarn graph auth --product subgraph-studio ${{ secrets.SUBGRAPH_STUDIO_KEY }} && \
yarn deploy morpho-blue --version-label ${{ github.ref }}
deploy-satsuma:
name: Deploy to Satsuma
runs-on: ubuntu-latest
environment:
name: Satsuma
url: https://subgraphs.alchemy.com/subgraphs/5856
steps:
- uses: actions/checkout@v3

- name: Setup node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: yarn

- name: Install dependencies
run: yarn --frozen-lockfile

- name: Generate types
run: yarn codegen

- name: Deploy to the studio
run: |
yarn deploy morpho-blue \
--version-label ${{ github.ref }} \
--node https://subgraphs.alchemy.com/api/subgraphs/deploy \
--deploy-key ${{ secrets.SATSUMA_DEPLOY_KEY }} \
--ipfs https://ipfs.satsuma.xy
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,3 @@ The list is updated each time the DAO is trusting a new market.

However, the subgraph is listing all created markets and computes the price by mapping a token symbol with a Chainlink price feed
to compute the USD or ETH price of an asset (if a price feed exists).



TODO:
checkk si les addons sont biens initialisés
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"scripts": {
"codegen": "graph codegen",
"build": "graph build",
"deploy:hs": "graph deploy --product hosted-service morpho-association/morpho-blue",
"create-local": "graph create --node http://localhost:8020/ morpho-org/morpho-blue",
"remove-local": "graph remove --node http://localhost:8020/ morpho-org/morpho-blue",
"deploy-local": "graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001 morpho-org/morpho-blue",
Expand Down

0 comments on commit e0f30b5

Please sign in to comment.