From 050af564abf12fe2f6daeaf2d9fa8f2f63a1db55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thea=20Sch=C3=B6bl?= Date: Mon, 31 Mar 2025 13:59:33 +0200 Subject: [PATCH] ci: add pull request workflows --- .github/workflows/build.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1f3a1076..e1d8b7f1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,10 @@ name: Build -on: [push] +on: + push: + branches: + - master + pull_request: jobs: build: @@ -41,10 +45,11 @@ jobs: echo "${{ secrets.DEPLOY_KNOWN_HOSTS }}" > ~/.ssh/known_hosts - name: Publish Stable - if: ${{ github.ref == 'refs/tags/v*' }} + if: ${{ github.ref == 'refs/tags/v*' && !github.event.pull_request.head.repo.fork }} run: rsync -rav --mkpath --delete build/ deploy@charachorder.io:/home/deploy/www/ - name: Publish Branch + if: ${{ !github.event.pull_request.head.repo.fork }} run: rsync -rav --mkpath --delete build/ deploy@charachorder.io:/home/deploy/ref/${GITHUB_REF##*/} - name: Publish Commit run: rsync -rav --mkpath --delete build/ deploy@charachorder.io:/home/deploy/ref/${{ github.sha }}