Increase retraining epochs #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to [staging/prod] | |
on: | |
push: | |
tags: | |
- staging | |
- prod | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.7 | |
- name: Install dependencies | |
run: pip install -r ./training_pipeline/requirements.txt | |
- name: Login to [staging] account | |
if: startsWith(github.ref, 'refs/tags/staging') | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
aws-region: eu-west-3 | |
role-to-assume: arn:aws:iam::381667332649:role/381667332649-github-full-access | |
- name: Login to [prod] account | |
if: startsWith(github.ref, 'refs/tags/prod') | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
aws-region: eu-west-3 | |
role-to-assume: arn:aws:iam::343975642840:role/343975642840-github-full-access | |
- name: Build all resources with terraform | |
working-directory: ./terraform/main | |
run: | | |
TAG_NAME=${{ github.ref }} | |
ENV_NAME=${TAG_NAME#refs/tags/} # Remove the 'refs/tags/' prefix | |
terraform init | |
terraform workspace select "$ENV_NAME" | |
terraform apply -auto-approve --var-file environment/"$ENV_NAME".tfvars | |
- name: Upload training data to S3 bucket | |
working-directory: ./training_pipeline | |
run: python upload_dataset.py | |
- name: Create training pipeline | |
working-directory: ./training_pipeline | |
run: python training_pipeline.py --action create | |
- name: Run training pipeline (only in prod) | |
if: startsWith(github.ref, 'refs/tags/prod') | |
working-directory: ./training_pipeline | |
run: python training_pipeline.py --action run |