Automatic Metrics API #165
Workflow file for this run
This file contains hidden or 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
name: trigger-site-build | |
on: | |
pull_request: | |
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 }} | |
jobs: | |
automate-metrics: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Automate Metrics | |
run: | | |
python -m venv analytics-api | |
source analytics-api/bin/activate | |
pip install google-analytics-data | |
pip install 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 |