33 lines
No EOL
983 B
YAML
33 lines
No EOL
983 B
YAML
name: Monthly Model Retraining
|
|
|
|
on:
|
|
schedule:
|
|
- cron: '0 0 1 * *' # Runs at 00:00 on the 1st of every month
|
|
workflow_dispatch: # Allows you to run it manually via the Actions tab
|
|
|
|
jobs:
|
|
retrain:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.10'
|
|
|
|
- name: Install Dependencies
|
|
run: |
|
|
pip install yfinance pandas pandas_ta scikit-learn tensorflow
|
|
|
|
- name: Run Retraining Script
|
|
run: python your_retrain_script.py
|
|
|
|
- name: Commit and Push Updated Models
|
|
run: |
|
|
git config --local user.email "action@github.com"
|
|
git config --local user.name "GitHub Action"
|
|
git add forex_random_forest_model.sav forex_lstm_model.keras
|
|
git commit -m "Monthly model update [automated]" || echo "No changes to commit"
|
|
git push |