From 84431c0911fbdd2cd60953659ed6c617cb1af357 Mon Sep 17 00:00:00 2001 From: hamelsmu Date: Mon, 6 Jun 2022 15:13:31 -0700 Subject: [PATCH] update Makefile and docs ci --- .github/workflows/deploy.yaml | 6 +++--- Makefile | 31 ++++++++++++++++--------------- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index ba6ede1..c747798 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -4,6 +4,7 @@ on: push: branches: - master + - main workflow_dispatch: jobs: @@ -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: diff --git a/Makefile b/Makefile index c01287a..4f2cead 100644 --- a/Makefile +++ b/Makefile @@ -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: @@ -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}'