fix install dependency issue #push #25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: deploy-book | |
on: | |
push: | |
branches: | |
- main # Adjust branch name if necessary | |
env: | |
BASE_URL: /${{ github.event.repository.name }} | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
jobs: | |
deploy-book: | |
if: | | |
github.repository == 'm3-learning/Predicting-Pulsed-Laser-Deposition-SrTiO3-Homoepitaxy-Growth-Dynamics-using-RHEED' && | |
contains(github.event.head_commit.message, '#push') | |
runs-on: ubuntu-latest | |
permissions: | |
pages: write | |
id-token: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GH_TOKEN }} | |
- name: Install System Dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y wget libjpeg-dev zlib1g-dev libfreetype6-dev \ | |
liblcms2-dev libwebp-dev libtiff-dev \ | |
libopenjp2-7 libavif-dev libgeos-dev | |
- name: Install Conda | |
run: | | |
wget -qO- https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh > miniconda.sh | |
bash miniconda.sh -b -p $HOME/miniconda | |
export PATH="$HOME/miniconda/bin:$PATH" | |
conda init bash | |
- name: Create and Activate Conda Environment | |
shell: bash -l {0} | |
run: | | |
source $HOME/.bashrc | |
conda init bash | |
conda create -n book python=3.11 -y | |
conda activate book | |
conda install -c conda-forge mayavi -y | |
- name: Install Dependencies | |
shell: bash -l {0} | |
run: | | |
source $HOME/.bashrc | |
conda init bash | |
conda activate book | |
pip install -r requirements.txt | |
- name: Build the book | |
shell: bash -l {0} | |
run: | | |
source $HOME/.bashrc | |
conda init bash | |
conda activate book | |
rm -rf ./book/_build | |
jupyter-book build ./book --config baseurl="${{ github.event.repository.name }}" | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GH_TOKEN }} | |
publish_dir: ./book/_build/html |