From f2e1c94e9e56b3a3c634cc41af5b9cd5ada23438 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Drouet?= Date: Fri, 6 Mar 2020 10:32:11 +0100 Subject: [PATCH] ci: fork shouldn't trigger deploy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérémie Drouet --- .github/workflows/build-pr.yml | 4 ++-- .github/workflows/clean-pr.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index 71632dcb23..0cc5ee50a9 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -15,10 +15,10 @@ jobs: - name: build image run: docker build --build-arg=ENABLE_ARCHIVES=false --target=current -t documentation:latest . - name: copy static files - if: github.repository == 'docker/docker.github.io' + if: github.event.pull_request.head.repo.fork == false run: docker run -v ${PWD}:/output documentation:latest cp -r /usr/share/nginx/html /output/_site - uses: ./.github/actions/netlify-deploy - if: github.repository == 'docker/docker.github.io' + if: github.event.pull_request.head.repo.fork == false with: directory: _site netlify_token: ${{ secrets.NETLIFY_AUTH_TOKEN }} diff --git a/.github/workflows/clean-pr.yml b/.github/workflows/clean-pr.yml index 26e4d53c72..7faf4a89d8 100644 --- a/.github/workflows/clean-pr.yml +++ b/.github/workflows/clean-pr.yml @@ -9,7 +9,7 @@ jobs: remove-site-from-netlify: name: build runs-on: ubuntu-latest - if: github.repository == 'docker/docker.github.io' + if: github.event.pull_request.head.repo.fork == false steps: - uses: actions/checkout@v2 with: