Skip to content

Deploy subgraph

Deploy subgraph #102

name: Deploy subgraph
on:
workflow_dispatch:
jobs:
deploy:
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest
env:
GOLDSKY_TOKEN: ${{ secrets.CI_GOLDSKY_TOKEN }}
GOLDSKY_SUBGRAPH_NAME: raindex
steps:
- uses: actions/checkout@v4
- name: Free disk space
uses: jlumbroso/free-disk-space@v1.3.1
- uses: nixbuild/nix-quick-install-action@v30
with:
nix_conf: |
keep-env-derivations = true
keep-outputs = true
- uses: cachix/cachix-action@v15
continue-on-error: true
with:
name: rainlanguage
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
useDaemon: false
- name: Restore and save Nix store
uses: nix-community/cache-nix-action@v6
with:
primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
restore-prefixes-first-match: nix-${{ runner.os }}-
gc-max-store-size-linux: 1G
# subgraph-deploy builds from the committed subgraph/abis + subgraph/generated,
# so it needs no forge build and runs on the slim subgraph shell.
- run: nix develop github:rainlanguage/rainix#subgraph-shell -c subgraph-deploy
# forwards status to telegram chat if this ci fails or gets canceled, only runs for default branch
- name: Forward CI Status
if: always()
uses: rainlanguage/github-chore/.github/actions/telegram-status-report@main
with:
status: ${{ job.status }}
telegram-bot-token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
telegram-chat-id: ${{ secrets.TELEGRAM_CHAT_ID }}