summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2023-04-30 14:03:29 -0400
committerEli Schwartz <eschwartz@archlinux.org>2023-05-01 15:22:41 -0400
commitf3635ff50d90ca2fbf87271dc3146f2aacdb6b3c (patch)
tree36a94dd967c3bdfd4fd3cccceffbf653186399af
parentf71c9aebfbceb8623756b981392b6d6d2b4e7c22 (diff)
downloadmeson-f3635ff50d90ca2fbf87271dc3146f2aacdb6b3c.tar.gz
avoid re-uploading the docs when a PR is based on the upstream repo
In this case, we have the secret available, and the workflow ran even though it wasn't on branch "master" because of the pull request trigger. Since the change hasn't landed on master, though, we do not want to update the website. So check for pushes to master, specifically.
-rw-r--r--.github/workflows/website.yml5
1 files changed, 2 insertions, 3 deletions
diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml
index 3b1d517a1..fa322fb42 100644
--- a/.github/workflows/website.yml
+++ b/.github/workflows/website.yml
@@ -41,7 +41,7 @@ jobs:
run: |
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-add - <<< "${{ secrets.WEBSITE_PRIV_KEY }}"
- if: env.HAS_SSH_KEY == 'true'
+ if: github.ref == 'refs/heads/master' && env.HAS_SSH_KEY == 'true'
- name: Build website
run: |
git config --global user.name "github-actions"
@@ -56,7 +56,7 @@ jobs:
run: |
cd docs
ninja -C _build upload
- if: env.HAS_SSH_KEY == 'true'
+ if: github.ref == 'refs/heads/master' && env.HAS_SSH_KEY == 'true'
- name: Release the current JSON docs
uses: svenstaro/upload-release-action@v2
with:
@@ -71,4 +71,3 @@ jobs:
file: docs/_build/meson-reference.3
tag: ${{ github.ref }}
if: ${{ github.event_name == 'release' }}
-