File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Publish gh-pages
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ concurrency :
9+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
10+ cancel-in-progress : true
11+
12+ permissions :
13+ contents : write
14+
15+ jobs :
16+ Publish-gh-pages :
17+ if : github.event.pull_request.draft == false
18+ runs-on : ubuntu-latest
19+
20+ steps :
21+ - uses : actions/checkout@v4
22+ with :
23+ fetch-depth : 0
24+
25+ - name : Set up Python 3.11
26+ uses : actions/setup-python@v5
27+ with :
28+ python-version : ' 3.11'
29+
30+ - name : Install Poetry
31+ run : |
32+ pip install poetry
33+
34+ - name : Cache Poetry virtualenv and dependencies
35+ uses : actions/cache@v4
36+ with :
37+ path : |
38+ ~/.cache/pypoetry
39+ ~/.cache/pip
40+ key : poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
41+ restore-keys : |
42+ poetry-${{ runner.os }}-
43+
44+ - name : Install dependencies
45+ run : |
46+ make install
47+
48+ - name : Run mkdocs deploy
49+ run : |
50+ poetry run mkdocs gh-deploy
51+ env :
52+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 55
66.PHONY: test-notebooks
77test-notebooks: ## Execute test notebooks using pytest and nbval
8- $(ENV_COMMAND_TOOL) nox -s test_nb
8+ $(ENV_COMMAND_TOOL) nox -s test_nb
9+
10+ ## -- Docs targets -------------------------------------------------------------------------------------------------- ##
11+ .PHONY: preview-docs
12+ preview-docs: ## Preview the documentation site locally
13+ @poetry run mkdocs serve -a 0.0.0.0:7000
14+
15+
16+ .PHONY: build-docs
17+ build-docs: ## Build the documentation files locally
18+ @poetry run mkdocs build
19+
20+ .PHONY: deploy-docs
21+ deploy-docs: ## Publish and deploy the documentation to the live Github page
22+ @echo""; \
23+ echo -e "\e[1;39;41m-- WARNING --\e[0m This command will deploy all current changes to the live Github page - Making it publicly available"; \
24+ echo""; \
25+ echo -n "Would you like to deploys the docs? [Y/n]: "; \
26+ read ans; \
27+ case $$ans in \
28+ [Yy]*) \
29+ echo""; \
30+ poetry run mkdocs gh-deploy; \
31+ echo""; \
32+ ;; \
33+ *) \
34+ echo""; \
35+ echo "Skipping publication to Github Pages."; \
36+ echo " "; \
37+ ;; \
38+ esac; \
You can’t perform that action at this time.
0 commit comments