diff --git a/.github/workflows/tools-api-docs-dev.yml b/.github/workflows/tools-api-docs-dev.yml index c8ccf211d6..8a45922c7c 100644 --- a/.github/workflows/tools-api-docs-dev.yml +++ b/.github/workflows/tools-api-docs-dev.yml @@ -1,7 +1,6 @@ name: nf-core/tools dev API docs -on: - push: - branches: [dev] +# Run on push and PR to test that docs build +on: [pull_request, push] jobs: api-docs: @@ -27,7 +26,8 @@ jobs: run: make --directory ./docs/api html - name: Sync dev docs - if: github.repository == 'nf-core/tools' + # Only sync with the website if it was a push from nf-core/tools dev branch + if: github.repository == 'nf-core/tools' && github.event.type == 'push' && github.event.base_ref == 'refs/heads/dev' uses: SamKirkland/FTP-Deploy-Action@4.0.0 with: server: ${{ secrets.ftp_server }}