From 986b06c1fdb4de4602f8786b80d36c6e2b3bd8fb Mon Sep 17 00:00:00 2001 From: frankknoll Date: Tue, 17 Jan 2023 14:58:00 +0100 Subject: [PATCH 1/2] Executing Intensivstationen.ipynb in workflow --- .github/workflows/buildAndDeployWebsite.yml | 25 ++++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/.github/workflows/buildAndDeployWebsite.yml b/.github/workflows/buildAndDeployWebsite.yml index 993ad385a2e..94db17f7434 100644 --- a/.github/workflows/buildAndDeployWebsite.yml +++ b/.github/workflows/buildAndDeployWebsite.yml @@ -13,6 +13,10 @@ jobs: uses: actions/checkout@v3 with: token: ${{ secrets.HOW_BAD_IS_MY_BATCH_ACCESS_TOKEN }} + - name: Configuring git + run: | + git config --global user.email "Knoll_Frank@web.de" + git config --global user.name "FK" - name: Installing dependencies uses: conda-incubator/setup-miniconda@v2 with: @@ -26,18 +30,27 @@ jobs: sudo apt install google-chrome-stable pip install selenium webdriver-manager pip install pycountry - - name: Executing HowBadIsMyBatch.ipynb + - name: Installing ipython kernel shell: bash -el {0} run: | ipython kernel install --user --name=howbadismybatch-venv-kernel + - name: Executing HowBadIsMyBatch.ipynb + shell: bash -el {0} + run: | cd src jupyter nbconvert --ExecutePreprocessor.kernel_name="howbadismybatch-venv-kernel" --to notebook --allow-errors --execute HowBadIsMyBatch.ipynb jupyter nbconvert --to html HowBadIsMyBatch.nbconvert.ipynb - - name: Pushing changes to GitHub Pages - shell: bash -el {0} - run: | - git config --global user.email "Knoll_Frank@web.de" - git config --global user.name "FK" git add -A git commit -m "updating data for batch codes" + - name: Executing Intensivstationen.ipynb + shell: bash -el {0} + run: | + src/intensivstationen + jupyter nbconvert --ExecutePreprocessor.kernel_name="howbadismybatch-venv-kernel" --to notebook --allow-errors --execute Intensivstationen.ipynb + jupyter nbconvert --to html Intensivstationen.nbconvert.ipynb + git add -A + git commit -m "updating data for Intensivstationen" + - name: Pushing changes + shell: bash -el {0} + run: | git push From 53b1d7be62ec9774d5262a3dd4716dc6b38355dc Mon Sep 17 00:00:00 2001 From: frankknoll Date: Tue, 17 Jan 2023 14:59:08 +0100 Subject: [PATCH 2/2] refactoring --- .github/workflows/buildAndDeployWebsite.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/buildAndDeployWebsite.yml b/.github/workflows/buildAndDeployWebsite.yml index 94db17f7434..5e54e3b8a7a 100644 --- a/.github/workflows/buildAndDeployWebsite.yml +++ b/.github/workflows/buildAndDeployWebsite.yml @@ -50,7 +50,7 @@ jobs: jupyter nbconvert --to html Intensivstationen.nbconvert.ipynb git add -A git commit -m "updating data for Intensivstationen" - - name: Pushing changes + - name: Pushing changes to GitHub Pages shell: bash -el {0} run: | git push