Skip to content

Commit

Permalink
workflow: run CI on pushes to main branch, not other branches (tmc#399)
Browse files Browse the repository at this point in the history
* workflow: fix publish-docs workflow error (tmc#398)

Fix errors like https://github.com/tmc/langchaingo/actions/runs/7094309081

* workflow: run CI on pushes to main branch, not other branches

Right now, each PR runs CI twice - once because it's a PR, and another
time because it comes from a push to a branch that created the PR.
See for example tmc#398, causing:

- https://github.com/tmc/langchaingo/actions/runs/7094374726
- https://github.com/tmc/langchaingo/actions/runs/7094367361

This change makes it so we only run CI once per PR, because there's no
need to run it on a branch push.

Now CI runs on either a PR or a push to `main`
  • Loading branch information
eliben authored Dec 5, 2023
1 parent 0217b03 commit af36340
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: ci

on:
push:
branches:
- main
pull_request:
branches:
- main
Expand Down

0 comments on commit af36340

Please sign in to comment.