Skip to content

Update-Cumulative-Users #3

Update-Cumulative-Users

Update-Cumulative-Users #3

name: Update-Cumulative-Users
on:
schedule:
- cron: "55 23 * * *"
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9.x'
- name: Install backend dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Analytics
env:
CLOUDFLARE_ZONE_TAG: ${{ secrets.CLOUDFLARE_ZONE_TAG }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
run: |
python analytics.py
- name: Save file
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
git add unique_visitors.csv cumulative_unique_visitors.png
git commit -m "Update unique visitors and cumulative visitors"
git push origin main