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
|
||||
Reference in New Issue
Block a user