-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (54 loc) · 1.95 KB
/
deploy_build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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