Update update_documentation.yml #8
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: Build Documentation using MkDocs | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
push: | |
branches: develop | |
pull_request: | |
branches: develop | |
jobs: | |
build: | |
name: Build and Deploy Documentation | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
language: [python, r] | |
python-version: [3.10.12] | |
r-version: [4.3.3] | |
steps: | |
- name: Checkout Master | |
uses: actions/checkout@v2 | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install mkdocs-material | |
- name: Set up R | |
uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: ${{ matrix.r-version }} | |
- name: Install libcurl development package | |
run: | | |
sudo apt-get update # Update package lists (for Debian/Ubuntu) | |
sudo apt-get install -y libcurl4-openssl-dev | |
- name: Install harfbuzz, fribidi, freetype2 development packages | |
run: | | |
sudo apt-get update # Update package lists (for Debian/Ubuntu) | |
sudo apt-get install -y libharfbuzz-dev libfribidi-dev libfreetype6-dev | |
- name: Install R dependencies | |
if: matrix.language == 'r' | |
run: | | |
install.packages('remotes') | |
remotes::install_version('renv', version = '0.15.0') | |
renv::restore() | |
shell: Rscript {0} | |
- name: Restore R dependencies | |
run: | | |
renv::restore() | |
- name: Deploy | |
run: | | |
git pull | |
make | |
mike set-default develop | |
mike deploy 0.3.0 --push |