github.com/drone/go-convert@v0.0.0-20240307072510-6bd371c65e61/convert/github/testdata/examples/if.yaml (about)

     1  name: if-example
     2  on:
     3    push:
     4      branches:
     5        - main
     6        - development
     7    pull_request:
     8      types: [opened, synchronize]
     9    schedule:
    10      - cron: '0 0 * * *'
    11    workflow_dispatch:
    12      inputs:
    13        test:
    14          description: 'Run tests'
    15          required: true
    16  jobs:
    17    build:
    18      runs-on: ubuntu-latest
    19      if: "!contains(github.event.head_commit.message, 'skip ci')"
    20      steps:
    21        - name: Checkout
    22          uses: actions/checkout@v2
    23        - name: Setup Node.js
    24          uses: actions/setup-node@v2
    25          with:
    26            node-version: '14.x'
    27        - name: Install dependencies
    28          run: npm ci
    29        - name: Build
    30          run: npm run build
    31        - name: Run tests
    32          run: npm test
    33      env:
    34        NODE_ENV: production
    35    deploy:
    36      needs: build
    37      runs-on: ubuntu-latest
    38      if: "github.event_name == 'push' && github.event.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, 'skip deploy')"
    39      steps:
    40        - name: Checkout
    41          uses: actions/checkout@v2
    42        - name: Deploy
    43          run: |
    44            echo "Deploying to production server"
    45      env:
    46        NODE_ENV: production