Create combine-job.yml

This commit is contained in:
Gina Maini 2021-08-17 12:50:55 -04:00 committed by GitHub
parent c24e13c930
commit 7df7c2b094
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

46
.github/workflows/combine-job.yml vendored Normal file
View file

@ -0,0 +1,46 @@
name: Combine Job
on:
workflow_dispatch:
inputs:
confirm-action:
description: This will combine the score.csv and GeoJSON national data, are you sure you want to proceed? (Y/n)
default: n
required: true
jobs:
deploy_data:
runs-on: ubuntu-latest
defaults:
run:
working-directory: data/data-pipeline
strategy:
matrix:
python-version: [3.9]
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Print variables to help debug
uses: hmarr/debug-action@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Setup Poetry
uses: Gr1N/setup-poetry@v7
- name: Print poetry version
run: poetry --version
- name: Install dependencies
run: poetry install
- name: Run Scripts
run: |
poetry run geo_score --data-source=aws
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.DATA_DEV_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.DATA_DEV_AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Deploy to Geoplatform AWS
run: |
aws s3 sync ./data_pipeline/data/score/geojson/usa-low.json s3://justice40-data/data-pipeline/data/score/geojson/usa-low.json --acl public-read --delete
aws s3 sync ./data_pipeline/data/score/geojson/usa-high.json s3://justice40-data/data-pipeline/data/score/geojson/usa-high.json --acl public-read --delete