Spaces:
Running
Running
Update ci.yml: Handle both PRs and commits to main
Browse files- .github/workflows/ci.yml +5 -1
.github/workflows/ci.yml
CHANGED
|
@@ -49,4 +49,8 @@ jobs:
|
|
| 49 |
- name: Push changes
|
| 50 |
if: success()
|
| 51 |
run: |
|
| 52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
- name: Push changes
|
| 50 |
if: success()
|
| 51 |
run: |
|
| 52 |
+
if [ "${{ github.event_name }}" = "pull_request" ]; then
|
| 53 |
+
git push origin HEAD:${{ github.event.pull_request.head.ref }};
|
| 54 |
+
else
|
| 55 |
+
git push origin HEAD:main;
|
| 56 |
+
fi
|