-
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (38 loc) · 1.12 KB
/
Copy pathupdate-data.yml
File metadata and controls
41 lines (38 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Update Data
on:
schedule:
- cron: "0 3 * * *" # 毎日12:00 JST (3:00 UTC)に実行
workflow_dispatch:
defaults:
run:
working-directory: ./packages/hub
jobs:
update-data:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: "true"
- uses: actions/setup-node@v4
with:
node-version: "lts/*"
cache: "yarn"
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Fetch GA data
env:
GA_SERVICE_ACCOUNT_KEY: ${{ secrets.GA_SERVICE_ACCOUNT_KEY }}
GA_PROPERTY_ID: ${{ secrets.GA_PROPERTY_ID }}
run: node ./scripts/fetch-ga-data.js
- name: Update Tag data
run: node ./scripts/update-tags.mjs
- name: Commit and push if changed
run: |
git config --global user.email "github-actions@example.com"
git config --global user.name "GitHub Actions"
git add -A
git commit -m "Update analytics data" || exit 0
git push
deploy-data:
needs: update-data
uses: ./.github/workflows/pages.yml