-
Notifications
You must be signed in to change notification settings - Fork 4
executable file
·45 lines (37 loc) · 1.64 KB
/
ci-cd.yml
File metadata and controls
executable file
·45 lines (37 loc) · 1.64 KB
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
name: CI/CD Pipeline
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Set up CML
uses: iterative/setup-cml@v2
- name: Register ZenML Experiment Tracker
run: zenml experiment-tracker register neptune_experiment_tracker --flavor=neptune --project="Sales-Conversion-Optimisation-MLOps-Project" --api_token="eyJhcGlfYWRkcmVzcyI6Imh0dHBzOi8vYXBwLm5lcHR1bmUuYWkiLCJhcGlfdXJsIjoiaHR0cHM6Ly9hcHAubmVwdHVuZS5haSIsImFwaV9rZXkiOiI5Mjg3OTM1OS01MjI2LTQzY2ItOTIzMi02YjIyMGMwZTUzMjkifQ=="
- name: Register ZenML Stack
run: zenml stack register neptune -a default -o default -e neptune_experiment_tracker --set
- name: Set ZenML Stack
run: zenml stack set neptune
- name: Run CI/CD script with Secrets
env:
EMAIL_PASSWORD: ${{ secrets.EMAIL_PASSWORD }} # Accessing the secret
API_TOKEN: ${{ secrets.API_TOKEN }} # Accessing the API token secret
run: python run_ci_cd.py
- name: CML Report
env:
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo '## CML Report' > report.md
echo 'Here are the results of the run:' >> report.md
cml publish CML_Reports/predictions_scatter_plot.png --md >> report.md
cml publish CML_Reports/residuals_plot.png --md >> report.md
cml comment create --publish report.md