Skip to content

Update Analytics

Update Analytics #633

name: Update Analytics
on:
schedule:
- cron: '0 8 * * *'
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checks out the repo
uses: actions/checkout@v3
- name: Sets up node
uses: actions/setup-node@v1
with:
node-version: 16
- name: Fetches dependencies
run: |
npm install --location=global yarn &&
yarn install --frozen-lockfile
- name: Updates analytics
run: yarn get-analytics
env:
GOOGLE_KEY: ${{ secrets.GOOGLE_KEY }}
- name: Commit update
run: |
[ $(git status --porcelain | wc -l) -eq "0" ] && exit 0;
git config --global user.name 'Mykola Myslovskyi'
git config --global user.email '${{ secrets.EMAIL }}'
git commit -am "chore: update analytics" && git push