Skip to content

Commit c823cf5

Browse files
committed
Fixed workflow
1 parent ba8a59d commit c823cf5

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/python-package.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@ jobs:
6161
python_version: "3.13"
6262
steps:
6363
- uses: actions/checkout@v5
64+
with:
65+
fetch-depth: 0
66+
ref: ${{ github.head_ref || github.ref_name }}
67+
- name: Sync with remote
68+
run: |
69+
git fetch origin
70+
git rebase origin/${{ github.ref_name }}
6471
- name: Set up Python ${{ env.python_version }}
6572
uses: actions/setup-python@v6
6673
with:
@@ -92,8 +99,9 @@ jobs:
9299
if: steps.changed_files.outputs.files_changed == 'true'
93100
uses: ad-m/github-push-action@master
94101
with:
102+
branch: ${{ github.head_ref || github.ref_name }}
103+
force: true
95104
github_token: ${{ secrets.GITHUB_TOKEN }}
96-
branch: main
97105
deploy:
98106
runs-on: ubuntu-latest
99107
needs: [prepare, coverage]

0 commit comments

Comments
 (0)