I need github actions to run only on the QAS branch and deploy event. It should run on 'pull_request' and 'pull' and only on the QAS branch.
name: Cypress
on: [deployment_status]
jobs:
e2e:
if: github.event.deployment_status.state == 'success'
runs-on: ubuntu-latest
steps:
- name: Print URL
run: echo Testing URL ${{ github.event.deployment_status.target_url }}
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2-beta
with:
node-version: 14
- name: Install modules
run: yarn
- name: Run Cypress
uses: cypress-io/github-action@v2
But I wanted something like this:
name: Cypress
on:
deployment_status:
pull_request:
branches:
- qas
push:
branches:
- qas
jobs:...