Skip to content

Commit

Permalink
go
Browse files Browse the repository at this point in the history
  • Loading branch information
brown9804 authored Jan 16, 2025
1 parent 9b74c61 commit 8ded964
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions .github/workflows/tracker_visits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- '**'
schedule:
- cron: '0 0 * * *' # Runs daily at midnight
- cron: '*/5 * * * *' # Runs every 5 minutes
workflow_dispatch:

jobs:
Expand All @@ -29,8 +29,7 @@ jobs:
- name: Set environment variables
run: echo "REPO_NAME=${{ github.repository }}" >> $GITHUB_ENV

- name: Run tracking script
env:
- name: Run tracking script env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: python .github/workflows/track_visitors.py

Expand All @@ -41,18 +40,11 @@ jobs:
git fetch origin
if git show-ref --verify --quiet refs/heads/visitors-count; then
git checkout visitors-count
git pull origin visitors-count --rebase || true
git pull origin visitors-count || true
else
git checkout -b visitors-count
git push origin visitors-count
fi
if [ -n "$(git status --porcelain)" ]; then
git stash || true
git pull origin visitors-count --rebase || true
git stash pop || true
else
git pull origin visitors-count --rebase || true
fi
git add -A
if git diff-index --quiet HEAD --; then
echo "No changes to commit"
Expand Down

0 comments on commit 8ded964

Please sign in to comment.