Skip to content

Metrics api

Metrics api #123

name: trigger-site-build
on:
pull_request:
jobs:
automate-metrics:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Automate Metrics
env:
PORTAL_ID: ${{ secrets.PORTAL_ID }}
FOUNDATIONS_ID: ${{ secrets.FOUNDATIONS_ID }}
COOKBOOKS_ID: ${{ secrets.COOKBOOKS_ID }}
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
PRIVATE_KEY_ID: ${{ secrets.PRIVATE_KEY_ID }}
run: |
python -m venv analytics-api
source analytics-api/bin/activate
pip install google-analytics-data cartopy matplotlib
curl -O https://raw.githubusercontent.com/jukent/projectpythia.github.io/main/.github/workflows/get-metrics.py
curl -O https://raw.githubusercontent.com/jukent/projectpythia.github.io/main/.github/workflows/write-metrics-md.py
python get-metrics.py
python write-metrics-md.py
build:
uses: ProjectPythia/cookbook-actions/.github/workflows/build-book.yaml@main
with:
environment_file: 'environment.yml'
environment_name: pythia
artifact_name: book-zip-${{ github.event.number }}
path_to_notebooks: 'portal'
build_command: 'make -j4 html'
# Other input options are possible, see ProjectPythia/cookbook-actions/.github/workflows/build-book.yaml