update readme
All checks were successful
Build and Publish Docker Image / docker (push) Successful in 29s
All checks were successful
Build and Publish Docker Image / docker (push) Successful in 29s
This commit is contained in:
35
Readme.md
35
Readme.md
@@ -1,29 +1,50 @@
|
|||||||
# Overview
|
# Overview
|
||||||
|
|
||||||
Alpine based image to build jupyter-book based documentation
|
Alpine based image to build zensical - https://zensical.org - based documentation
|
||||||
|
|
||||||
Build manually:
|
Build manually:
|
||||||
```bash
|
```bash
|
||||||
docker run -it --rm -v $(pwd):/data --workdir /data gitea.psi.ch/images/alpine-zensical
|
docker run -it --rm -v $(pwd):/data --workdir /data gitea.psi.ch/images/alpine-zensical
|
||||||
|
|
||||||
/opt/python-env/bin/zensical build --site-dir public
|
/opt/python-env/bin/zensical build
|
||||||
```
|
```
|
||||||
|
|
||||||
Use Gitea action to build the documentation:
|
Use Gitea/Github action to build the documentation:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
name: Build and Publish Site
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-deploy:
|
docker:
|
||||||
runs-on: ubuntu-latest-intranet
|
runs-on: ubuntu-latest-intranet
|
||||||
container:
|
container:
|
||||||
image: gitea.psi.ch/images/alpine-zensical
|
image: gitea.psi.ch/images/alpine-zensical
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Build Jupyter Book
|
- name: Run mkdocs
|
||||||
run: /opt/python-env/bin/zensical build --site-dir public
|
run: /opt/python-env/bin/zensical build
|
||||||
|
|
||||||
|
- name: Configure Git
|
||||||
|
run: |
|
||||||
|
git config --global user.name "Gitea Actions"
|
||||||
|
git config --global user.email "actions@gitea.local"
|
||||||
|
|
||||||
|
- name: Push to gitea-pages branch
|
||||||
|
run: |
|
||||||
|
git checkout --orphan gitea-pages
|
||||||
|
git reset --hard
|
||||||
|
mv site/* .
|
||||||
|
git add .
|
||||||
|
git commit -m "Update site - $(date)"
|
||||||
|
git push -f https://${{secrets.GITHUB_TOKEN}}@gitea.psi.ch/${{ github.repository }}.git gitea-pages
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user