initial commit
All checks were successful
Build and Publish Docker Image / docker (push) Successful in 36s

This commit is contained in:
2025-12-04 14:24:45 +01:00
commit 5bc24cf89e
3 changed files with 79 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
name: Build and Publish Docker Image
on:
push:
branches:
- main
workflow_dispatch:
jobs:
docker:
runs-on: ubuntu-latest-intranet
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to Docker Registry
uses: docker/login-action@v3
with:
registry: gitea.psi.ch
username: ${{ github.repository_owner }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: gitea.psi.ch/${{ github.repository }}:latest

19
Dockerfile Normal file
View File

@@ -0,0 +1,19 @@
FROM alpine
# 1. Install Python 3, pip and build tools (needed for packages with C extensions)
RUN apk --no-cache add\
python3 \
py3-pip \
git \
nodejs
# 2. Install the Python packages that were listed in the Debian image
RUN python3 -m venv /opt/python-env
RUN /opt/python-env/bin/python3 -m pip install --upgrade pip
RUN /opt/python-env/bin/pip install --no-cache-dir \
zensical
# 3. (Optional) Clean up if you added any temporary files
RUN rm -rf /var/cache/apk/*

32
Readme.md Normal file
View File

@@ -0,0 +1,32 @@
# Overview
Alpine based image to build jupyter-book based documentation
Build manually:
```bash
docker run -it --rm -v $(pwd):/data --workdir /data gitea.psi.ch/images/alpine-zensical
/opt/python-env/bin/zensical build --site-dir public
```
Use Gitea action to build the documentation:
```yaml
jobs:
build-and-deploy:
runs-on: ubuntu-latest-intranet
container:
image: gitea.psi.ch/images/alpine-zensical
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build Jupyter Book
run: /opt/python-env/bin/zensical build --site-dir public
```
```bash
docker build --platform linux/x86_64 -t gitea.psi.ch/images/alpine-zensical:latest .
```