File tree Expand file tree Collapse file tree 2 files changed +26
-35
lines changed
Expand file tree Collapse file tree 2 files changed +26
-35
lines changed Original file line number Diff line number Diff line change 1- name : github pages
1+ name : Deploy and Update Analytics
22
33on :
44 push :
55 branches :
66 - main
7+ schedule :
8+ - cron : ' 0 0 * * *' # Runs every day at midnight UTC
9+ workflow_dispatch : # Allows manual triggering
710
811jobs :
12+ update-analytics :
13+ if : github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
14+ runs-on : ubuntu-latest
15+ steps :
16+ - uses : actions/checkout@v4
17+
18+ - name : Setup Node
19+ uses : actions/setup-node@v2.1.2
20+ with :
21+ node-version : ' 20.x'
22+
23+ - run : npm install
24+
25+ - name : Run analytics update
26+ run : npm run analytics
27+ env :
28+ GOOGLE_CLIENT_ID : ${{ secrets.GOOGLE_CLIENT_ID }}
29+ GOOGLE_CLIENT_SECRET : ${{ secrets.GOOGLE_CLIENT_SECRET }}
30+ GOOGLE_REFRESH_TOKEN : ${{ secrets.GOOGLE_REFRESH_TOKEN }}
31+ PROPERTY_ID : ${{ secrets.PROPERTY_ID }}
32+
933 deploy :
34+ if : github.event_name == 'push'
1035 runs-on : ubuntu-latest
1136 steps :
1237 - uses : actions/checkout@v4
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments