Skip to content

Commit edc4c0c

Browse files
authored
update doc build tooling to Zensical (#221)
* update doc build tooling to Zensical * update doc build tooling to Zensical
1 parent e2165e6 commit edc4c0c

10 files changed

Lines changed: 42 additions & 773 deletions

File tree

.github/workflows/website.yml

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,34 @@ on:
55
paths:
66
- 'web/**'
77

8-
defaults:
9-
run:
10-
working-directory: web
11-
128
jobs:
139
build:
1410
name: Build and Deploy Website
1511
runs-on: ubuntu-latest
1612
steps:
17-
- uses: actions/checkout@v2
18-
- uses: actions/setup-python@v2
13+
- uses: actions/checkout@master
14+
- uses: actions/setup-python@v6
1915
with:
2016
python-version: '3.x'
2117
- name: Install requirements 📦
2218
run: |
2319
python -m pip install --upgrade pip
24-
pip install -r requirements.txt
25-
- name: Deploy 📦
26-
run: mkdocs gh-deploy --strict --force --message 'update website via GitHub Actions'
20+
pip3 install -r web/requirements.txt
21+
- name: Build site 📦
22+
run: |
23+
cd web && zensical build --clean --strict
24+
mv site /tmp/
25+
- name: checkout gh-pages branch
26+
uses: actions/checkout@master
27+
with:
28+
ref: gh-pages
29+
- name: Deploy to GitHub Pages 📦
30+
run: |
31+
git checkout gh-pages
32+
git config --global user.email "tomkralidis@gmail.com"
33+
git config --global user.name "Tom Kralidis"
34+
ls | grep -v ".nojekyll"| xargs rm -fr
35+
mv -f /tmp/site/* .
36+
git add .
37+
git commit -am "update website via GitHub Actions"
38+
git push

web/README.md

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Workshop website
22

33
This [workshop](https://geopython.github.io/geopython-workshop) is powered
4-
by [MkDocs](https://www.mkdocs.org) which facilitates easy management
4+
by [Zensical](https://zensical.org) which facilitates easy management
55
of website content and publishing.
66

77
## Setting up the website environment locally
@@ -16,9 +16,9 @@ cd geopython-workshop/web
1616
# install required dependencies
1717
pip install -r requirements.txt
1818
# build the website
19-
mkdocs build
19+
zensical build --clean --strict
2020
# serve locally
21-
mkdocs serve # website is made available on http://localhost:8000/
21+
zensical serve # website is made available on http://localhost:8000/
2222
```
2323

2424
## Content management workflow
@@ -35,10 +35,10 @@ The basic workflow is as follows:
3535

3636
```bash
3737
vi docs/new-page.md # add content
38-
vi mkdocs.yml # add to navigation section
38+
vi zensical.toml # add to navigation section
3939
# edit any other files necessary which may want to link to the new page
4040
git add docs/new-page.md
41-
git commit -m 'add new page on topic x' docs/new-page.md mkdocs.yml
41+
git commit -m 'add new page on topic x' docs/new-page.md zensical.toml
4242
git push origin master
4343
```
4444

@@ -48,11 +48,4 @@ Like adding a page. Edit and commit/push.
4848

4949
## Publishing updates to the live site
5050

51-
Updates are automatically pushed to GitHub Pages. To publish updates
52-
manually:
53-
54-
```bash
55-
# NOTE: you require access privileges to the GitHub repository
56-
# to publish live updates
57-
mkdocs gh-deploy -m 'add new page on topic x'
58-
```
51+
Updates are automatically pushed to GitHub Pages.

web/docs/assets/javascripts/custom.js

Lines changed: 0 additions & 180 deletions
This file was deleted.

0 commit comments

Comments
 (0)