adding github actions workflow
This commit is contained in:
42
.github/workflows/bulidAndDeployWebsite.yml
vendored
Normal file
42
.github/workflows/bulidAndDeployWebsite.yml
vendored
Normal file
@@ -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
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -15,3 +15,4 @@ src/HowBadIsMyBatch.nbconvert.ipynb
|
|||||||
src/HowBadIsMyBatch.nbconvert.html
|
src/HowBadIsMyBatch.nbconvert.html
|
||||||
src/__pycache__/
|
src/__pycache__/
|
||||||
src/intensivstationen/__pycache__/
|
src/intensivstationen/__pycache__/
|
||||||
|
google-chrome-stable_current_amd64*
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
name: howbadismybatch-venv
|
name: howbadismybatch-venv
|
||||||
channels:
|
channels:
|
||||||
- defaults
|
- defaults
|
||||||
|
# - conda-forge
|
||||||
dependencies:
|
dependencies:
|
||||||
- python=3
|
- python=3
|
||||||
- ipykernel
|
- ipykernel
|
||||||
@@ -13,4 +14,8 @@ dependencies:
|
|||||||
- jupyter
|
- jupyter
|
||||||
- tensorflow
|
- tensorflow
|
||||||
- nb_conda_kernels
|
- nb_conda_kernels
|
||||||
|
- pillow
|
||||||
|
# - selenium
|
||||||
|
# - webdriver-manager
|
||||||
|
# - pycountry
|
||||||
prefix: /home/frankknoll/anaconda3/envs/howbadismybatch-venv
|
prefix: /home/frankknoll/anaconda3/envs/howbadismybatch-venv
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"updateVAERSFiles(\n",
|
"updateVAERSFiles(\n",
|
||||||
" needsUpdate = needsUpdate,\n",
|
" needsUpdate = True,\n",
|
||||||
" years = years_from_2020_to_present,\n",
|
" years = years_from_2020_to_present,\n",
|
||||||
" workingDirectory = os.getcwd())"
|
" workingDirectory = os.getcwd())"
|
||||||
]
|
]
|
||||||
@@ -107,7 +107,6 @@
|
|||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"def publishGitHubPages():\n",
|
"def publishGitHubPages():\n",
|
||||||
" %cd /home/frankknoll/Dokumente/Corona/projects/HowBadIsMyBatch-pages\n",
|
|
||||||
" ! git add -A\n",
|
" ! git add -A\n",
|
||||||
" ! git commit -m \"updating data for batch codes\"\n",
|
" ! git commit -m \"updating data for batch codes\"\n",
|
||||||
" ! git push"
|
" ! git push"
|
||||||
@@ -148,7 +147,7 @@
|
|||||||
"name": "python",
|
"name": "python",
|
||||||
"nbconvert_exporter": "python",
|
"nbconvert_exporter": "python",
|
||||||
"pygments_lexer": "ipython3",
|
"pygments_lexer": "ipython3",
|
||||||
"version": "3.10.8"
|
"version": "3.10.8 (main, Nov 24 2022, 14:13:03) [GCC 11.2.0]"
|
||||||
},
|
},
|
||||||
"vscode": {
|
"vscode": {
|
||||||
"interpreter": {
|
"interpreter": {
|
||||||
|
|||||||
Reference in New Issue
Block a user