add backend
Build and Deploy / build-and-deploy (push) Failing after 5m26s

This commit is contained in:
2026-05-03 20:58:09 +02:00
parent f3dfdb2f90
commit d9e3f398b8
8 changed files with 3722 additions and 484 deletions
+26
View File
@@ -0,0 +1,26 @@
import { createDatabase, createLocalDatabase } from '@tinacms/datalayer'
import { MongodbLevel } from 'mongodb-level'
import { GitHubProvider } from 'tinacms-gitprovider-github'
const isLocal = process.env.TINA_PUBLIC_IS_LOCAL === 'true'
const branch = process.env.GITEA_BRANCH || 'main'
export default isLocal
? createLocalDatabase()
: createDatabase({
gitProvider: new GitHubProvider({
branch,
owner: process.env.GITEA_OWNER!,
repo: process.env.GITEA_REPO!,
token: process.env.GITEA_TOKEN!,
octokitOptions: {
// Gitea's GitHub-compatible API
baseUrl: 'https://git.idealconnected.com/api/v1',
},
}),
databaseAdapter: new MongodbLevel({
collectionName: 'tinacms',
dbName: 'tinacms',
mongoUri: process.env.MONGODB_URI!,
}),
})