diff --git a/.github/workflows/bulidAndDeployWebsite.yml b/.github/workflows/bulidAndDeployWebsite.yml new file mode 100644 index 00000000000..688588e5097 --- /dev/null +++ b/.github/workflows/bulidAndDeployWebsite.yml @@ -0,0 +1,42 @@ +name: build-and-deploy-website +run-name: build and deploy website +on: + workflow_dispatch: + schedule: + # daily at 19:30: '30 19 * * *' + - cron: '*/5 * * * *' +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v3 + with: + token: ${{ secrets.HOW_BAD_IS_MY_BATCH_ACCESS_TOKEN }} + - name: installing dependencies + uses: conda-incubator/setup-miniconda@v2 + with: + activate-environment: howbadismybatch-venv + environment-file: environment.yml + - name: installing Google Chrome + shell: bash -el {0} + run: | + wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb + sudo dpkg -i google-chrome-stable_current_amd64.deb + sudo apt install google-chrome-stable + pip install selenium webdriver-manager + pip install pycountry + - name: executing HowBadIsMyBatch.ipynb + shell: bash -el {0} + run: | + git config --global user.email "Knoll_Frank@web.de" + git config --global user.name "FK" + ipython kernel install --user --name=howbadismybatch-venv-kernel + 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: Archiving HowBadIsMyBatch.nbconvert.html + uses: actions/upload-artifact@v3 + with: + name: HowBadIsMyBatch.nbconvert.html + path: src/HowBadIsMyBatch.nbconvert.html diff --git a/.gitignore b/.gitignore index ae2653d0236..6f8952ce1f2 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ src/HowBadIsMyBatch.nbconvert.ipynb src/HowBadIsMyBatch.nbconvert.html src/__pycache__/ src/intensivstationen/__pycache__/ +google-chrome-stable_current_amd64* \ No newline at end of file diff --git a/environment.yml b/environment.yml index 21f780ee838..1a8b92646d9 100644 --- a/environment.yml +++ b/environment.yml @@ -1,6 +1,7 @@ name: howbadismybatch-venv channels: - defaults + # - conda-forge dependencies: - python=3 - ipykernel @@ -13,4 +14,8 @@ dependencies: - jupyter - tensorflow - nb_conda_kernels + - pillow + # - selenium + # - webdriver-manager + # - pycountry prefix: /home/frankknoll/anaconda3/envs/howbadismybatch-venv diff --git a/src/HowBadIsMyBatch.ipynb b/src/HowBadIsMyBatch.ipynb index 4db00c56585..1caf8eb0b1d 100644 --- a/src/HowBadIsMyBatch.ipynb +++ b/src/HowBadIsMyBatch.ipynb @@ -63,7 +63,7 @@ "outputs": [], "source": [ "updateVAERSFiles(\n", - " needsUpdate = needsUpdate,\n", + " needsUpdate = True,\n", " years = years_from_2020_to_present,\n", " workingDirectory = os.getcwd())" ] @@ -107,7 +107,6 @@ "outputs": [], "source": [ "def publishGitHubPages():\n", - " %cd /home/frankknoll/Dokumente/Corona/projects/HowBadIsMyBatch-pages\n", " ! git add -A\n", " ! git commit -m \"updating data for batch codes\"\n", " ! git push" @@ -148,7 +147,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.8" + "version": "3.10.8 (main, Nov 24 2022, 14:13:03) [GCC 11.2.0]" }, "vscode": { "interpreter": {