-
Notifications
You must be signed in to change notification settings - Fork 17
36 lines (28 loc) · 1.06 KB
/
deploy_on_release.yaml
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
name: model-deploy-on-release
on:
release:
types:
- 'created'
jobs:
run:
runs-on: [ubuntu-latest]
container: docker://dvcorg/cml-py3:latest
steps:
- uses: actions/checkout@v2
- name: 'Deploy/Update on new release'
shell: bash
env:
repo_token: ${{ secrets.GITHUB_TOKEN }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
CRED_SECRET: ${{ secrets.IBM_CREDENTIALS_PASS }}
run: |
# Install requirements
pip install -r requirements.txt
# Pull data & run-cache from S3 and reproduce pipeline
dvc pull --run-cache
dvc repro
# Decrypt credentials file
gpg --quiet --batch --yes --decrypt --passphrase="$CRED_SECRET" --output credentials.yaml credentials.yaml.gpg
# Check if there is a deployment already, if positive update it, otherwise deploys it for the first time
./src/scripts/Scripts/git_release_pipeline.sh