diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2023-04-30 14:03:29 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2023-05-01 15:22:41 -0400 |
commit | f3635ff50d90ca2fbf87271dc3146f2aacdb6b3c (patch) | |
tree | 36a94dd967c3bdfd4fd3cccceffbf653186399af | |
parent | f71c9aebfbceb8623756b981392b6d6d2b4e7c22 (diff) | |
download | meson-f3635ff50d90ca2fbf87271dc3146f2aacdb6b3c.zip meson-f3635ff50d90ca2fbf87271dc3146f2aacdb6b3c.tar.gz meson-f3635ff50d90ca2fbf87271dc3146f2aacdb6b3c.tar.bz2 |
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.yml | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index 3b1d517..fa322fb 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' }} - |