Skip to content

Commit

Permalink
deploy-private-nextflu: Download builds with AWS Batch Job ID
Browse files Browse the repository at this point in the history
Adds an input for the AWS Batch Job ID to be able to attach to a private
nextflu build and build the site with the output Auspice JSONs.

Requires the Auspice JSONs to be in `auspice-who` since that is the
output directory for the private.nextflu.org profile.¹

¹ https://github.com/nextstrain/seasonal-flu/blob/80f3be31a56abd92908a56343edb7af48fa38274/profiles/private.nextflu.org/export.smk#L17
  • Loading branch information
joverlee521 committed Sep 8, 2023
1 parent 88cf087 commit d58a45e
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/deploy-private-nextflu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@ name: Deploy private.nextflu.org

on:
workflow_dispatch:
inputs:
aws_batch_job_id:
description: The AWS Batch Job ID for the private nextflu seasonal flu builds.
type: string
required: true

env:
# Everything should run from within the nextflu/auspice directory
# https://github.com/blab/nextflu/tree/e672eba6d2e0ad5e10b0775f94fc87ffc75d6005/auspice
WORKING_DIR: auspice
AUSPICE_DIR: auspice-who

defaults:
run:
Expand Down Expand Up @@ -37,6 +43,30 @@ jobs:
# https://github.com/blab/nextflu/blob/12c5645d990f53c553d6f04e293e2f12b4ad3575/auspice/Gemfile.lock
working-directory: ${{ env.WORKING_DIR }}

- uses: nextstrain/.github/actions/setup-nextstrain-cli@master

- name: Download builds from AWS Batch
run: |
nextstrain build \
--aws-batch \
--attach "$AWS_BATCH_JOB_ID" \
--download "$AUSPICE_DIR/*.json" \
--no-logs \
.
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_BATCH_JOB_ID: ${{ inputs.aws_batch_job_id }}

- name: Move Auspice JSONs
run: |
mkdir data
mv "$AUSPICE_DIR"/*.json data/
rm -r "$AUSPICE_DIR"
- name: Create index filex
run: python provision_directories.py

- name: Build site
run: bundle exec jekyll build

Expand Down

0 comments on commit d58a45e

Please sign in to comment.