Merge pull request #6 from edgeandnode/tmigone/sepolia #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Staging Subgraph (Mainnet) | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
# Install commands | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '14' | |
registry-url: https://registry.npmjs.org | |
- name: yarn add ts-node | |
run: yarn add ts-node | |
- name: yarn install | |
run: yarn install | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.graphprotocol_npm_token}} | |
# Run scripts | |
- name: Prepare mainnet | |
run: ./node_modules/.bin/mustache ./config/mainnet.json subgraph.template.yaml > subgraph.yaml && ./node_modules/@graphprotocol/graph-cli/bin/graph codegen --output-dir src/types/ | |
- name: Deploy to mainnet staging | |
run: ./node_modules/@graphprotocol/graph-cli/bin/graph deploy graphprotocol/billing-staging --ipfs https://api.thegraph.com/ipfs/ --node https://api.thegraph.com/deploy/ --access-token ${{secrets.access_token}} |