diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2021-06-03 14:38:29 +0100 |
---|---|---|
committer | Daniel Mensinger <daniel@mensinger-ka.de> | 2021-06-11 10:46:55 +0200 |
commit | 1ab0694556b6c0117b7b5072ec906dee2029adec (patch) | |
tree | 9b9d1914e2f8ba464c807570623acfae87b6570b /.github | |
parent | 89f2f78972d0c78bc34a68e4c057c403da4fde86 (diff) | |
download | meson-1ab0694556b6c0117b7b5072ec906dee2029adec.zip meson-1ab0694556b6c0117b7b5072ec906dee2029adec.tar.gz meson-1ab0694556b6c0117b7b5072ec906dee2029adec.tar.bz2 |
CI: Don't try to update website in a forked repository
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/website.yml | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/.github/workflows/website.yml b/.github/workflows/website.yml index ae732e2..3fee7bf 100644 --- a/.github/workflows/website.yml +++ b/.github/workflows/website.yml @@ -10,6 +10,8 @@ on: jobs: update_website: + env: + HAS_SSH_KEY: ${{ secrets.WEBSITE_PRIV_KEY != '' }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -23,13 +25,18 @@ jobs: run: | ssh-agent -a $SSH_AUTH_SOCK > /dev/null ssh-add - <<< "${{ secrets.WEBSITE_PRIV_KEY }}" - - name: Update website - env: - SSH_AUTH_SOCK: /tmp/ssh_agent.sock + if: env.HAS_SSH_KEY == 'true' + - name: Build website run: | git config --global user.name "github-actions" git config --global user.email "github-actions@github.com" cd docs meson setup _build ninja -C _build + - name: Update website + env: + SSH_AUTH_SOCK: /tmp/ssh_agent.sock + run: | + cd docs ninja -C _build upload + if: env.HAS_SSH_KEY == 'true' |