Skip to content

Update Social Media Thumbnails for Algorithm Explorer #3471

Update Social Media Thumbnails for Algorithm Explorer

Update Social Media Thumbnails for Algorithm Explorer #3471

Workflow file for this run

name: Update Social Media Thumbnails for Algorithm Explorer
on:
schedule:
- cron: "0 */3 * * *" # Runs "at minute 0 past every 3rd hour." (see https://crontab.guru)
workflow_dispatch: # Runs on manual trigger
jobs:
build:
runs-on: ubuntu-20.04
environment: Content Deploy
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |-
python -m pip install --upgrade pip
pip install kaleido==0.2.1
pip install numpy==1.24.2
pip install Pillow==9.3.0
pip install plotly==5.13.1
- name: Social Media Thumbnails
run: python ./Explore/generate_social_media_thumbnails.py
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_SECRET }}
aws-region: us-west-1
- name: Copy files to the S3 website content bucket
run: |-
aws s3 cp ./Explore/thumbnails s3://${{ secrets.AWS_BUCKET }}/explore/thumbnails --recursive --acl bucket-owner-full-control --exclude "*" --include "*.png" --content-type "image/png"