Pull data from S3, write HTML and push #623
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
name: Pull data from S3, write HTML and push | |
on: | |
schedule: | |
- cron: '0 17 * * 1,2,3' # run mon,tues. this is in GMT (so noon EST) | |
# on: push | |
# branches: [gh-pages] | |
jobs: | |
update_caption_data: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: {} | |
- name: debug | |
run: | | |
ls | |
- name: Setup environment | |
run: | | |
pip install -r requirements.txt | |
- name: Get caption contest IDs | |
run: | | |
cd nyccwinners && python get_nycc_winners.py && cd .. | |
git add nyccwinners/nyc_winners.json | |
- name: Download data | |
env: | |
CCD_IP: ${{ secrets.CCD_IP }} | |
CCD_MACHINE: ${{ secrets.CCD_MACHINE }} | |
FOO: bar | |
run: | | |
python download_dashboards.py | |
git add summaries/*.csv cartoons/*.jpg | |
- name: Integrate data | |
run: | | |
python write-html.py | |
git add dashboards/*.html | |
git add index.html | |
- name: Push | |
run: | | |
git status | |
git config --global user.name 'github-actions-bot' | |
git config --global user.email '947546838+github-actions[bot]@users.noreply.github.com' | |
git commit -m "Update caption contest data" | |
git push |