From 7df7c2b0948a191ae32a347c02437d330b673e9d Mon Sep 17 00:00:00 2001 From: Gina Maini <43176575+ginabeena@users.noreply.github.com> Date: Tue, 17 Aug 2021 12:50:55 -0400 Subject: [PATCH] Create combine-job.yml --- .github/workflows/combine-job.yml | 46 +++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/combine-job.yml diff --git a/.github/workflows/combine-job.yml b/.github/workflows/combine-job.yml new file mode 100644 index 00000000..7ae988ca --- /dev/null +++ b/.github/workflows/combine-job.yml @@ -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