ga4_google_analytics_etl #319
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |