name: Main
on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master
  schedule:
    - cron: "30 2 * * *"
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Set up Python 3.6
      uses: actions/setup-python@v2
      with:
        python-version: 3.6
    - name: Install dependencies
      run: |
        python -m pip install -r requirements.txt
    - name: Freeze HTML
      run: |
        python pyladies_cz.py freeze
    - name: Deploy
      run: |
        python pyladies_cz.py deploy --no-freeze --push
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

name: Main
on:
  push:
  pull_request:
  schedule:
    - cron: "30 2 * * *"
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Set up Python 3.6
      uses: actions/setup-python@v2
      with:
        python-version: 3.6
    - name: Install dependencies
      run: |
        python -m pip install -r requirements.txt
    - name: Freeze HTML
      run: |
        python pyladies_cz.py freeze
    - if: ${{ github.ref == 'refs/heads/master' }}
      name: Deploy
      run: |
        python pyladies_cz.py deploy --no-freeze --push
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Deploy part is triggered only on master branch.
Deploy part is triggered only on master branch.
