title: Manually triggered Github Action is always being skipped
body: <p>I have a working Github Action file that build on commits.</p>
  <p>I want to be able to manually trigger a build so I only added <strong>&quot;workflow_dispatch&quot;</strong> and got the nice option button visible in the GUI where I can select which branch to manually build.</p>
  <p><strong>But</strong> when I select a branch (<strong>&quot;dev&quot;</strong>) and start the build it always get skipped?!</p>
  <p>The yml-file is both in my <strong>&quot;main&quot;</strong> branch and in the desired branch <strong>&quot;dev&quot;</strong></p>
  <p><em>My yml-file looks like below and &quot;workflow_dispatch&quot; is the <strong>only</strong> thing I have changed:</em></p>
  <pre><code>name: Build for dev
  
  on:
    workflow_dispatch:
    push:
      branches:
        - dev
    pull_request:
      types: [opened, synchronize, reopened, closed]
      branches:
        - dev
  
  jobs:
    build_and_deploy_job:
      if: github.event_name == 'push' || (github.event_name == 'pull_request' &amp;&amp; github.event.action != 'closed')
      runs-on: ubuntu-latest
      name: Build and Deploy Job
      steps:
        - uses: actions/checkout@v2
          with:
            submodules: true
        - name: Build And Deploy
          id: builddeploy
          uses: Azure/static-web-apps-deploy@v0.0.1-preview
          with:
            app_build_command: &quot;npm run build-dev&quot;
            azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_XXXXX }}
            repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
            action: &quot;upload&quot;
            ###### Repository/Build Configurations - These values can be configured to match you app requirements. ######
            # For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
            app_location: &quot;/&quot; # App source code path
            api_location: &quot;api&quot; # Api source code path - optional
            output_location: &quot;dist&quot; # Built app content directory - optional
            ###### End of Repository/Build Configurations ######
          env:
            NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
  
    close_pull_request_job:
      if: github.event_name == 'pull_request' &amp;&amp; github.event.action == 'closed'
      runs-on: ubuntu-latest
      name: Close Pull Request Job
      steps:
        - name: Close Pull Request
          id: closepullrequest
          uses: Azure/static-web-apps-deploy@v0.0.1-preview
          with:
            azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_XXXXX }}
            action: &quot;close&quot;
  
  
  </code></pre>
  <p>Does anyone know why build is being skipped, or where I can see the reason for it?</p>
  <p><strong>UPDATE:</strong> Screenshot from skipped build:
  <a href="https://i.stack.imgur.com/pK4aG.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pK4aG.jpg" alt="enter image description here" /></a></p>
  <p><strong>UPDATED! I found solution myself!</strong> I had an if statement in &quot;build_and_deploy_job&quot; so I needed to change it to:</p>
  <pre><code>if: github.event_name == 'workflow_dispatch' || github.event_name == 'push' || (github.event_name == 'pull_request' &amp;&amp; github.event.action != 'closed')
  </code></pre>