Spaces:
Sleeping
Sleeping
modified update_forecast.yml file
Browse files
.github/workflows/update_forecast.yml
CHANGED
|
@@ -6,25 +6,40 @@ on:
|
|
| 6 |
workflow_dispatch: # Manually trigger the workflow
|
| 7 |
|
| 8 |
jobs:
|
| 9 |
-
|
| 10 |
-
|
| 11 |
|
| 12 |
-
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
$HOME/miniconda/bin/conda run -n airquality python update_forecast.py
|
|
|
|
| 6 |
workflow_dispatch: # Manually trigger the workflow
|
| 7 |
|
| 8 |
jobs:
|
| 9 |
+
update-forecast:
|
| 10 |
+
runs-on: ubuntu-latest
|
| 11 |
|
| 12 |
+
steps:
|
| 13 |
+
- uses: actions/checkout@v2
|
| 14 |
+
|
| 15 |
+
- name: Install Miniconda
|
| 16 |
+
run: |
|
| 17 |
+
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
|
| 18 |
+
bash miniconda.sh -b -p $HOME/miniconda
|
| 19 |
+
echo "$HOME/miniconda/bin" >> $GITHUB_PATH
|
| 20 |
+
source $HOME/miniconda/bin/activate
|
| 21 |
+
conda init bash
|
| 22 |
+
source ~/.bashrc
|
| 23 |
+
|
| 24 |
+
- name: Create and activate conda environment
|
| 25 |
+
run: |
|
| 26 |
+
conda create --name airquality python=3.8 -y
|
| 27 |
+
source $HOME/miniconda/bin/activate
|
| 28 |
+
conda activate airquality
|
| 29 |
+
conda install -n airquality -c conda-forge prophet pandas altair streamlit numpy -y
|
| 30 |
|
| 31 |
+
- name: Install additional dependencies
|
| 32 |
+
run: |
|
| 33 |
+
source $HOME/miniconda/bin/activate
|
| 34 |
+
conda activate airquality
|
| 35 |
+
pip install -r requirements.txt
|
| 36 |
+
|
| 37 |
+
- name: Run data update script
|
| 38 |
+
env:
|
| 39 |
+
GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }}
|
| 40 |
+
run: |
|
| 41 |
+
source $HOME/miniconda/bin/activate
|
| 42 |
+
conda activate airquality
|
| 43 |
+
python update_forecast.py
|
| 44 |
+
|
| 45 |
+
|
|
|