Problem
The deploy workflow triggers on ANY push to main, including PRs that only change GitHub workflow files (.github/workflows/*.yml). This causes unnecessary subgraph deployments that can break the /version/latest alias in The Graph Studio if left unpublished.
Proposed Solution
Add a paths filter to the deploy workflow so it only triggers when actual subgraph code changes:
on:
push:
branches: ["main"]
paths:
- 'schema.graphql'
- 'src/**'
- 'subgraph.*.yaml'
- 'package.json'
- 'networks.json'
- 'abis/**'
workflow_dispatch:
Considerations
Problem
The deploy workflow triggers on ANY push to main, including PRs that only change GitHub workflow files (
.github/workflows/*.yml). This causes unnecessary subgraph deployments that can break the/version/latestalias in The Graph Studio if left unpublished.Proposed Solution
Add a
pathsfilter to the deploy workflow so it only triggers when actual subgraph code changes:Considerations
workflow_dispatchis preserved so manual deployments are still possible