Spaces:
Sleeping
Sleeping
name: Deployment workflow | |
on: | |
push: | |
paths: | |
- 'examples/github/train.py' | |
- 'examples/github/titanic_test_data.csv' | |
- 'examples/github/requirements.txt' # temporarily | |
- '.github/workflows/giskard_action.yaml' # temporarily | |
jobs: | |
Deployment: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Extract branch name | |
shell: bash | |
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" | |
id: extract_branch | |
- name: checkout repo content | |
uses: actions/checkout@v4 # checkout the repository content to github runner | |
- name: setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' # install the python version needed | |
- uses: syphar/restore-virtualenv@v1 | |
id: cache-virtualenv | |
with: | |
requirement_files: examples/github/requirements.txt # this is optional | |
- uses: syphar/restore-pip-download-cache@v1 | |
if: steps.cache-virtualenv.outputs.cache-hit != 'true' | |
# the package installation will only be executed when the | |
# requirements-files have changed. | |
- run: pip install -r examples/github/requirements.txt | |
env: | |
EMAIL_ADDRESS: ${{ secrets.EMAIL_ADDRESS }} | |
EMAIL_PASSWORD: ${{ secrets.EMAIL_PASSWORD }} | |
EMAIL_RECIPIENT: ${{ secrets.EMAIL_RECIPIENT }} | |
if: steps.cache-virtualenv.outputs.cache-hit != 'true' | |
- name: training | |
run: | | |
python examples/github/train.py | |
- name: execute pipeline | |
run: | | |
python cli.py --loader github --model examples/github/artifacts/model --dataset examples/github/artifacts/dataset --output_format markdown | |