-
Notifications
You must be signed in to change notification settings - Fork 170
35 lines (29 loc) · 1.19 KB
/
gh-actions.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
34
35
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"