Skip to content

Commit

Permalink
Fix tina build
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinDelille committed Apr 30, 2023
1 parent 54626e1 commit 3cda88c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/jekyll.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ jobs:
- name: Setup Pages
id: pages
uses: actions/configure-pages@v2
- name: Build TinaCMS
env:
TINA_CLIENT_ID: ${{ secrets.TINA_CLIENT_ID }}
TINA_TOKEN: ${{ secrets.TINA_TOKEN }}
run: npx tinacms build
- name: Generate the coworkers pages
env:
COWORKERS_URL: ${{ secrets.COWORKERS_URL }}
Expand Down
11 changes: 6 additions & 5 deletions tina/config.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { defineConfig } from "tinacms";
import { postFields } from "./templates";

// Your hosting provider likely exposes this as an environment variable
const branch = process.env.HEAD || process.env.VERCEL_GIT_COMMIT_REF || "main";
const BRANCH = process.env.HEAD || process.env.VERCEL_GIT_COMMIT_REF || "main";
const CLIENT_ID = String(process.env.TINA_CLIENT_ID ?? '');
const TOKEN = String(process.env.TINA_TOKEN ?? '');

export default defineConfig({
branch,
clientId: null, // Get this from tina.io
token: null, // Get this from tina.io
branch: BRANCH,
clientId: CLIENT_ID,
token: TOKEN,
client: { skip: true },
build: {
outputFolder: "admin",
Expand Down

0 comments on commit 3cda88c

Please sign in to comment.