name: Build and deploy
on:
  push:
    branches:
      - master
  schedule:
    - cron: "* 04 * * *"
jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Build
        run: |
          npm install
          npm run build
      - name: Set up SSH
        uses: webfactory/ssh-agent@v0.2.0
        with:
          ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
      - name: Deploy
        uses: JamesIves/github-pages-deploy-action@releases/v3
        with:
          SSH: true
          SINGLE_COMMIT: true
          BASE_BRANCH: master
          BRANCH: gh-pages
          FOLDER: dist

name: Build and deploy
on:
  push:
    branches:
      - master
  schedule:
    - cron: "20 04 * * *"
jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Build
        run: |
          npm install
          npm run build
      - name: Set up SSH
        uses: webfactory/ssh-agent@v0.2.0
        with:
          ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
      - name: Deploy
        uses: JamesIves/github-pages-deploy-action@releases/v3
        with:
          SSH: true
          SINGLE_COMMIT: true
          BASE_BRANCH: master
          BRANCH: gh-pages
          FOLDER: dist

Reduce cron job frequency to once per day
Reduce cron job frequency to once per day