Spaces:
Sleeping
Sleeping
| 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 | |