From 48616fd71b38c1a035af6fcc1fb7be5394e61c37 Mon Sep 17 00:00:00 2001 From: Jake Mensch Date: Mon, 26 Oct 2020 11:11:20 -0700 Subject: [PATCH] swapped in prefect script for daily update --- .github/workflows/Daily_Backend_Update.yml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Daily_Backend_Update.yml b/.github/workflows/Daily_Backend_Update.yml index 2ea6cc766..528ccc713 100644 --- a/.github/workflows/Daily_Backend_Update.yml +++ b/.github/workflows/Daily_Backend_Update.yml @@ -5,21 +5,38 @@ on: - cron: '0 7 * * *' jobs: + # dev_update: + # runs-on: ubuntu-latest + # steps: + # - name: run update script on AWS dev + # uses: appleboy/ssh-action@master + # with: + # username: ec2-user + # host: ${{ secrets.AWS_SSH_HOST_DEV }} + # key: ${{ secrets.AWS_SSH_PEM_KEY }} + # command_timeout: 60m + # script: | + # set -e + # cd 311-data/server + # docker-compose run --rm api python bin/db_update.py + dev_update: runs-on: ubuntu-latest steps: - name: run update script on AWS dev uses: appleboy/ssh-action@master + env: + PREFECT__CONTEXT__SECRETS__SLACK_HOOK: ${{ secrets.SLACK_HOOK_DEV }} with: username: ec2-user host: ${{ secrets.AWS_SSH_HOST_DEV }} key: ${{ secrets.AWS_SSH_PEM_KEY }} command_timeout: 60m + envs: PREFECT__CONTEXT__SECRETS__SLACK_HOOK script: | set -e cd 311-data/server - # docker-compose run --rm api python bin/db_update.py - docker-compose run --rm prefect python flow.py + docker-compose run -e PREFECT__CONTEXT__SECRETS__SLACK_HOOK prefect python flow.py prod_update: runs-on: ubuntu-latest