name: Node CI

on:
  schedule:
    - cron: '*/1 * * * *'

jobs:
  build:

    runs-on: ubuntu-18.04

    strategy:
      matrix:
        node-version: [10.x]

    steps:
    - uses: actions/checkout@v1
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v1
      with:
        node-version: ${{ matrix.node-version }}
    - name: npm i
      run: npm i
    - name: node index.js
      run: node index.js
    - name: deploy
      run: git config --global user.email 'berkantk3@gmail.com' && git config --global user.name 'Berkant Korkmaz' && git remote set-url origin https://berkantkz:${{ secrets.token }}@github.com/berkantkz/KLU_Yemek.git && git add list.json && git commit -am 'update list' && echo berkantkz | echo ${{ secrets.token }} | git push origin HEAD:master
      env:
        CI: true
        ACCESS_TOKEN: ${{ secrets.token }}
        BASE_BRANCH: master
        BRANCH: master
       

name: Node CI

on:
  schedule:
    - cron: '0 */6 * * *'

jobs:
  build:

    runs-on: ubuntu-18.04

    strategy:
      matrix:
        node-version: [10.x]

    steps:
    - uses: actions/checkout@v1
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v1
      with:
        node-version: ${{ matrix.node-version }}
    - name: npm i
      run: npm i
    - name: node index.js
      run: node index.js
    - name: deploy
      run: git config --global user.email 'berkantk3@gmail.com' && git config --global user.name 'Berkant Korkmaz' && git remote set-url origin https://berkantkz:${{ secrets.token }}@github.com/berkantkz/KLU_Yemek.git && git add list.json && git commit -am 'update list' && echo berkantkz | echo ${{ secrets.token }} | git push origin HEAD:master
      env:
        CI: true
        ACCESS_TOKEN: ${{ secrets.token }}
        BASE_BRANCH: master
        BRANCH: master
       

Update the list at every 6th hour
actions: Update the list at every 6th hour
