Only deploy pull requests

Is is possible to run a deployment step only if it's a pull request or do I need to use a branch convention for that?

  1. You can add a condition to deployment, something like:

    deploy:
    - provider: ...
      ...
      on:
        APPVEYOR_PULL_REQUEST_NUMBER: /\d+/
    
  2. Oh, sorry, I've misread the question. Deployment is disabled for PRs, but you can allow deployment on PRs for private repositories only.

  3. Ok, so just to be clean, with a paid AppVeyor account I can deploy on PR:s, or do you mean a private GitHub repository?

  4. I mean private GitHub repository.

    With public repo anyone can do a PR and cause deployment which is a security issue.

  5. That's true.

    Is it possible to add a condition like "only deploy open PR:s to the master branch" with a private repository?

  6. Yes, you can add another condition:

      ...
      on:
        APPVEYOR_PULL_REQUEST_NUMBER: /\d+/
        branch: master
    
  7. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:03 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac