Skip to content

Update Stats

Update Stats #156

Workflow file for this run

name: Update Stats
on:
workflow_dispatch:
schedule:
- cron: '46 15 * * *'
jobs:
build:
permissions: write-all
runs-on: macos-latest
steps:
- name: install gdal
run: |
wget https://github.com/OSGeo/gdal/archive/refs/tags/v3.6.4.tar.gz -O gdal.tar.gz
tar -xzf gdal.tar.gz
cd gdal-3.6.4
cmake ../gdal-3.6.4
make
make install
- name: get current date and time
run: echo "RUN=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_ENV
- name: checkout repo
uses: actions/checkout@v2
- name: setup python
uses: actions/setup-python@v4
with:
python-version: '3.10.8'
- name: install python packages
run: |
python -m pip install --upgrade pip
pip install gdal==$(gdal-config --version)
pip install -r ./.github/requirements.txt
- name: execute python script
env:
SITE: navendu.me
PERIOD: 30d
TOKEN: ${{ secrets.PLAUSIBLE_TOKEN }}
run: python ./.github/main.py
- name: commit files
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add -A
git diff-index --quiet HEAD || (git commit -a -m "update stats" --allow-empty)
- name: push changes
uses: ad-m/github-push-action@v0.6.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: hugo