From 7bfa7fb5af44adf4395e2b87e33d9838e0f9b160 Mon Sep 17 00:00:00 2001 From: Michael Rogenmoser Date: Thu, 27 Jul 2023 09:44:56 +0200 Subject: [PATCH] Limit page deployment of CI to master branch --- .github/workflows/doc.yml | 5 +++-- .github/workflows/gitlab-ci.yml | 4 ---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 0f50b87e5..2996e519b 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -60,8 +60,9 @@ jobs: - name: Deploy documentation uses: JamesIves/github-pages-deploy-action@v4 if: > - github.event_name == 'push' - || github.event.pull_request.head.repo.full_name == github.repository + (github.event_name == 'push' + || github.event.pull_request.head.repo.full_name == github.repository) && + github.ref == 'refs/heads/master' with: token: ${{ secrets.GH_PAGES }} branch: gh-pages # The branch the action should deploy to. diff --git a/.github/workflows/gitlab-ci.yml b/.github/workflows/gitlab-ci.yml index 560eaedbb..96456f43e 100644 --- a/.github/workflows/gitlab-ci.yml +++ b/.github/workflows/gitlab-ci.yml @@ -4,10 +4,6 @@ on: branches-ignore: - gh-pages # deployment target branch (this workflow should not exist on that branch anyway) - v** # such branch names conflict with tags - pull_request: - branches-ignore: - - gh-pages # deployment target branch (this workflow should not exist on that branch anyway) - - v** # such branch names conflict with tags workflow_dispatch: jobs: