pnpm update, type fixing and automatic oikb push action
Next.js App CI / docker (push) Failing after 2m12s

This commit is contained in:
2026-07-06 22:03:33 +02:00
parent 15f26caced
commit 22f666b9a2
3 changed files with 65 additions and 8 deletions
+9 -1
View File
@@ -42,4 +42,12 @@ jobs:
# make this work in future releases
# cache-from: type=registry,ref=${{ vars.LOCAL_REGISTRY }}/${{ gitea.repository_owner }}/website:buildcache
# cache-to: type=registry,ref=${{ vars.LOCAL_REGISTRY }}/${{ gitea.repository_owner
# cache-to: type=registry,ref=${{ vars.LOCAL_REGISTRY }}/${{ gitea.repository_owner
- name: Sync docs to Open WebUI
uses: docker://ghcr.io/open-webui/oikb:latest
with:
args: sync ${{ gitea.workspace }} --kb-id ${{ secrets.KB_ID }}
env:
OPEN_WEBUI_URL: ${{ secrets.OPEN_WEBUI_URL }}
OPEN_WEBUI_API_KEY: ${{ secrets.OPEN_WEBUI_API_KEY }}
+6 -7
View File
@@ -23,9 +23,8 @@ export function getPublicationsData(): Publication[] {
return bibtexJson.entries.map((entry) => {
const authorNames = entry.fields.author
? entry.fields.author.map(
(author) => `${author.firstName} ${author.lastName}`
)
: [];
(author) => `${author.firstName} ${author.lastName}`
): [];
let bibtexEntryString = `@${entry.type}{${entry.key},\n`;
for (const [key, value] of Object.entries(entry.fields)) {
@@ -48,11 +47,11 @@ export function getPublicationsData(): Publication[] {
return {
key: entry.key,
title: Array.isArray(entry.fields.title) ? entry.fields.title.join(" ") : entry.fields.title,
title: Array.isArray(entry.fields.title) ? entry.fields.title.join(" ") : (entry.fields.title || ""),
authors: authorNames,
journal: Array.isArray(journalField) ? journalField.join(" ") : journalField,
year: Array.isArray(entry.fields.year) ? entry.fields.year.join(" ") : entry.fields.year,
url: Array.isArray(entry.fields.url) ? entry.fields.url.join(" ") : entry.fields.url,
journal: Array.isArray(journalField) ? journalField.join(" ") : (journalField || ""),
year: Array.isArray(entry.fields.year) ? entry.fields.year.join(" ") : (entry.fields.year || ""),
url: Array.isArray(entry.fields.url) ? entry.fields.url.join(" ") : (entry.fields.url || ""),
bibtex: bibtexEntryString,
pdfUrl: `/publications/${entry.key}.pdf`,
pdfAvailable: pdfExists,
+50
View File
@@ -0,0 +1,50 @@
declare module '@retorquere/bibtex-parser' {
// Represents a single author/creator object inside the author array
export interface Creator {
firstName?: string;
lastName?: string;
prefix?: string;
suffix?: string;
initial?: string;
useprefix?: boolean;
family?: string;
given?: string;
name?: string;
}
// Represents the fields object inside an entry.
// 'author' is specifically typed, everything else is treated as an array of strings or a single string.
export interface Fields {
author?: Creator[];
editor?: Creator[];
translator?: Creator[];
title?: string | string[];
journal?: string | string[];
booktitle?: string | string[];
year?: string | string[];
url?: string | string[];
[key: string]: any; // Catch-all for other BibTeX fields (volume, pages, publisher, etc.)
}
// Represents a single parsed BibTeX entry
export interface Entry {
type: string;
key: string;
fields: Fields;
crossref?: any;
creators?: Record<string, Creator[]>;
}
// Represents the overall output of the parse function
export interface Library {
entries: Entry[];
errors: any[];
comments: string[];
strings: Record<string, string>;
jabref?: any;
}
// The main parse function you are importing
export function parse(input: string, options?: any): Library;
export function parseAsync(input: string, options?: any): Promise<Library>;
}