-
Notifications
You must be signed in to change notification settings - Fork 1
33 lines (30 loc) · 981 Bytes
/
ga4_etl.yml
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
# This is a basic workflow that is manually triggered
name: ga4_google_analytics_etl
on:
workflow_dispatch:
schedule:
- cron: 30 7 * * *
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
ga4-etl:
permissions:
contents: 'read'
id-token: 'write'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests pandas google-cloud-bigquery pyarrow google-analytics-data
- name: Authorize google cloud
uses: google-github-actions/auth@v2
with:
credentials_json: '${{ secrets.GOOGLE_ANALYTICS_API_SERVICE_ACCOUNT}}'
- name: Run github etl script
run: |
python src/pythonScripts/googleAnalytics/googleAnalyticsApiGa4Only.py