Skip to content

Commit

Permalink
update Makefile and docs ci
Browse files Browse the repository at this point in the history
  • Loading branch information
hamelsmu committed Jun 6, 2022
1 parent ddbc89f commit 84431c0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- master
- main
workflow_dispatch:

jobs:
Expand All @@ -14,15 +15,14 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: '3.9'
architecture: 'x64'
python-version: "3.9"
architecture: "x64"
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
make install
- name: Build website
run: make docs

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
Expand Down
31 changes: 16 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,32 +1,36 @@
.ONESHELL:
SHELL := /bin/bash
.DEFAULT_GOAL := help

sync:
help: ## Show this help
@egrep -h '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'

sync: ## Propagates any change in the modules (.py files) to the notebooks that created them
nbprocess_update

deploy: docs
deploy: docs ## Push local docs to gh-pages branch
nbprocess_ghp_deploy

preview:
preview: ## Live preview quarto docs with hot reloading.
nbprocess_sidebar
quarto preview

docs: .FORCE
docs: .FORCE ## Build quarto docs and put them into folder specified in `doc_path` in settings.ini
nbprocess_export
nbprocess_quarto

prepare: test
nbprocess_clean
prepare: ## Export notebooks to python modules, test code and clean notebooks.
nbprocess_export

test:
pip install -e .
nbprocess_test
nbprocess_clean

test: ## Test notebooks
nbprocess_test

release_all: pypi conda_release
release_all: pypi conda_release ## Release python package on pypi and conda. Also bumps version number automatically.
nbdev_bump_version

release_pypi: pypi
release_pypi: pypi ## Release python package on pypi. Also bumps version number automatically.
nbdev_bump_version

conda_release:
Expand All @@ -44,11 +48,8 @@ clean:
install: install_quarto
pip install -e .

install_quarto: .FORCE
install_quarto: .FORCE ## Install the latest version of quarto for Mac and Linux. Go to https://quarto.org/docs/get-started/ for Windows.
./install_quarto.sh


.FORCE:

help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

0 comments on commit 84431c0

Please sign in to comment.