52 lines
2.0 KiB
YAML
52 lines
2.0 KiB
YAML
name: build-and-deploy-website
|
|
run-name: build and deploy website
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
# At 01:30 on Saturday:
|
|
- cron: '30 1 * * 6'
|
|
jobs:
|
|
build-and-deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checking out repository code
|
|
uses: actions/checkout@v3
|
|
with:
|
|
token: ${{ secrets.HOW_BAD_IS_MY_BATCH_ACCESS_TOKEN }}
|
|
- name: Configuring git
|
|
run: |
|
|
git config --global user.email "<>"
|
|
git config --global user.name "no name"
|
|
- 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: |
|
|
conda activate howbadismybatch-venv
|
|
wget https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_127.0.6533.119-1_amd64.deb
|
|
sudo dpkg -i google-chrome-stable_current_amd64.deb
|
|
sudo apt install google-chrome-stable
|
|
- name: Installing ipython kernel
|
|
shell: bash -el {0}
|
|
run: |
|
|
conda activate howbadismybatch-venv
|
|
ipython kernel install --user --name=howbadismybatch-venv-kernel
|
|
- name: Executing HowBadIsMyBatch.ipynb
|
|
shell: bash -el {0}
|
|
run: |
|
|
conda activate howbadismybatch-venv
|
|
cd src
|
|
jupyter nbconvert --to script HowBadIsMyBatch.ipynb
|
|
python ./HowBadIsMyBatch.py
|
|
# jupyter nbconvert --ExecutePreprocessor.kernel_name="howbadismybatch-venv-kernel" --to notebook --allow-errors --execute HowBadIsMyBatch.ipynb
|
|
# jupyter nbconvert --to html HowBadIsMyBatch.nbconvert.ipynb
|
|
git add -A
|
|
git diff-index --quiet HEAD || git commit -m "updating data for batch codes"
|
|
- name: Pushing changes to GitHub Pages
|
|
shell: bash -el {0}
|
|
run: |
|
|
git push
|