Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 22
check-latest: true

- name: Add to Hosts
Expand Down
73 changes: 47 additions & 26 deletions .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,60 @@
name: Deploy Docs
# Workflow for building and deploying a VitePress site to GitHub Pages
#
name: Deploy VitePress site to Pages

on:
# Runs on pushes targeting the `main` branch. Change this to `master` if you're
# using the `master` branch as the default branch.
push:
branches:
- version-15
branches: [version-15]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: pages
cancel-in-progress: false

jobs:
deploy:
name: Build Docs and Deploy to GitHub Pages
# Build job
build:
runs-on: ubuntu-latest
permissions:
contents: write # To push a branch
pages: write # To push to a GitHub Pages site
id-token: write # To update the deployment status
steps:
- uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v5
- name: Setup Node
uses: actions/setup-node@v6
with:
fetch-depth: 0
- name: Install latest mdbook
run: |
tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name')
url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz"
mkdir mdbook
curl -sSL $url | tar -xz --directory=./mdbook
echo `pwd`/mdbook >> $GITHUB_PATH
- name: Build Book
run: |
cd docs
mdbook build
node-version: 22
cache: yarn
- name: Setup Pages
uses: actions/configure-pages@v4
uses: actions/configure-pages@v5
- name: Install dependencies
run: yarn install
- name: Build with VitePress
run: yarn docs:build-gh
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
uses: actions/upload-pages-artifact@v4
with:
# Upload entire repository
path: 'docs/book'
path: docs/.vitepress/dist

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@ cypress/screenshots
csf_za/public/node_modules

# Package management is managed by bench
yarn.lock
yarn.lock

# Docs
docs/.vitepress/dist
docs/.vitepress/cache
11 changes: 3 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ MIT

### User documentation

User documentation is hosted at [csf-za-docs.finfoot.tech](https://csf-za-docs.finfoot.tech)
📄 [South Africa Customisations Documentation](https://csf-za-docs.starktail.com)

### Development

Expand Down Expand Up @@ -73,11 +73,6 @@ git clone --depth 1 https://github.com/frappe/semgrep-rules.git frappe-semgrep-r
semgrep --config=/workspace/development/frappe-semgrep-rules/rules apps/csf_za
```

#### Updating Documentation

The documentation has been generated using [mdBook](https://rust-lang.github.io/mdBook/guide/creating.html)

Make sure you have [mdbook](https://rust-lang.github.io/mdBook/guide/installation.html) installed/downloaded. To modify and test locally:
```shell
cd docs
mdbook serve --open
```
For documentation, we use [vitepress](https://vitepress.dev/). You can run `yarn docs:dev` to preview the docs when applying changes
12 changes: 12 additions & 0 deletions csf_za/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Ignore vitepress dist files
www/csf_za_*.py
www/404.py
www/csf_za_*.html
www/404.html
www/hashmap.json
www/vp-icons.css
www/assets
public/app.*.js
public/csf_za_*.js
public/style.*.css
public/chunks
2 changes: 1 addition & 1 deletion csf_za/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.2.4"
__version__ = "0.2.5"
10 changes: 10 additions & 0 deletions csf_za/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,3 +254,13 @@
],
}
]


standard_help_items = [
{
"item_label": "South Africa Customisations Documentation",
"item_type": "Route",
"route": "/csf_za_introduction",
"is_standard": 1,
},
]
Loading