Skip to content

Commit 281c66a

Browse files
committed
Fix deploy - skal kun deploye ved merge til main
1 parent 6d10228 commit 281c66a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

.github/workflows/build-deploy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ jobs:
4343
env:
4444
GITHUB_USERNAME: x-access-token
4545
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
if: github.base_ref == 'main' && github.event.pull_request.merged == true
4647
run: |
4748
export GIT_COMMIT_HASH=$(git log -n 1 --pretty=format:'%h')
4849
export GIT_COMMIT_DATE=$(git log -1 --pretty='%ad' --date=format:'%Y%m%d%H%M%S')
@@ -52,6 +53,7 @@ jobs:
5253
mvn --settings .m2/maven-settings.xml versions:commit
5354
5455
- name: Deploy to Github Package
56+
if: github.base_ref == 'main' && github.event.pull_request.merged == true
5557
env:
5658
GITHUB_USERNAME: x-access-token
5759
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)