Skip to content

Commit

Permalink
Install tinacms cloud backend
Browse files Browse the repository at this point in the history
- Add tinacms admin build step in github deploy workflow
- Rename .tina folder back to tina
  • Loading branch information
AngeloThys committed May 12, 2024
1 parent 83f0d46 commit ca840fd
Show file tree
Hide file tree
Showing 8 changed files with 81 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ permissions:
id-token: write

jobs:
build-tinacms-admin:
env:
TINA_PUBLIC_CLIENT_ID: ${{ secrets.TINA_PUBLIC_CLIENT_ID }}
TINA_TOKEN: ${{ secrets.TINA_TOKEN }}
run: npx tinacms build
build:
runs-on: ubuntu-latest
steps:
Expand Down
9 changes: 9 additions & 0 deletions content/posts/hello-world.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: Hello, World!
---

## Hello World!

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut non lorem diam. Quisque vulputate nibh sodales eros pretium tincidunt. Aenean porttitor efficitur convallis. Nulla sagittis finibus convallis. Phasellus in fermentum quam, eu egestas tortor. Maecenas ac mollis leo. Integer maximus eu nisl vel sagittis.

Suspendisse facilisis, mi ac scelerisque interdum, ligula ex imperdiet felis, a posuere eros justo nec sem. Nullam laoreet accumsan metus, sit amet tincidunt orci egestas nec. Pellentesque ut aliquet ante, at tristique nunc. Donec non massa nibh. Ut posuere lacus non aliquam laoreet. Fusce pharetra ligula a felis porttitor, at mollis ipsum maximus. Donec quam tortor, vehicula a magna sit amet, tincidunt dictum enim. In hac habitasse platea dictumst. Mauris sit amet ornare ligula, blandit consequat risus. Duis malesuada pellentesque lectus, non feugiat turpis eleifend a. Nullam tempus ante et diam pretium, ac faucibus ligula interdum.
16 changes: 13 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
1 change: 1 addition & 0 deletions tina/.tina/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__generated__
File renamed without changes.
File renamed without changes.
53 changes: 53 additions & 0 deletions tina/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import { defineConfig } from "tinacms";

// Your hosting provider likely exposes this as an environment variable
const branch =
process.env.GITHUB_BRANCH ||
process.env.VERCEL_GIT_COMMIT_REF ||
process.env.HEAD ||
"main";

export default defineConfig({
branch,

// Get this from tina.io
clientId: process.env.NEXT_PUBLIC_TINA_CLIENT_ID,
// Get this from tina.io
token: process.env.TINA_TOKEN,

build: {
outputFolder: "admin",
publicFolder: "public",
},
media: {
tina: {
mediaRoot: "",
publicFolder: "public",
},
},
// See docs on content modeling for more info on how to setup new content models: https://tina.io/docs/schema/
schema: {
collections: [
{
name: "post",
label: "Posts",
path: "content/posts",
fields: [
{
type: "string",
name: "title",
label: "Title",
isTitle: true,
required: true,
},
{
type: "rich-text",
name: "body",
label: "Body",
isBody: true,
},
],
},
],
},
});

0 comments on commit ca840fd

Please sign in to comment.