Skip to content

Deploy datasets build #161

Deploy datasets build

Deploy datasets build #161

Workflow file for this run

name: "Deploy datasets build"
on:
workflow_dispatch:
inputs:
environment:
description: Environment to deploy
required: true
type: environment
ref:
description: Specific ref to deploy (if different from workflow branch)
type: string
required: false
workflow_call:
inputs:
environment:
description: Environment to deploy
required: true
type: string
ref:
description: Branch name, commit sha or tag to deploy (defaults to source branch)
type: string
default: ${{ github.ref_name }}
jobs:
push_build:
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}
concurrency: ${{ inputs.environment }}
env:
PYTHONPATH: "lib/:${PYTHONPATH}"
BUCKET_NAME: ${{ secrets.BUCKET_NAME }}
BUCKET_PUBLIC_DOMAIN: ${{ secrets.BUCKET_PUBLIC_DOMAIN }}
DATASETS_ADMIN_API_URL: ${{ secrets.DATASETS_ADMIN_API_URL }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || github.ref_name }}
- name: Setup virtualenv
uses: ./.github/actions/setup-venv
with:
venv-path: .venv
- name: Run build
shell: bash
run: .venv/bin/python3 -m dsets build
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: "us-east-1"
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Upload assets
run: .venv/bin/python3 -m dsets upload-assets
- name: Deploy build
run: .venv/bin/python3 -m dsets deploy-build