Skip to content

Commit

Permalink
Add github branch env variable, point said variable to correct branch
Browse files Browse the repository at this point in the history
  • Loading branch information
AngeloThys committed May 12, 2024
1 parent 53f0cfc commit 15f10b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
run: npm ci
- name: Build TinaCMS
env:
GITHUB_BRANCH: "feature/tinacms"
CLIENT_ID: ${{ secrets.TINA_PUBLIC_CLIENT_ID }}
TINA_TOKEN: ${{ secrets.TINA_TOKEN }}
run: npx tinacms build
Expand Down
5 changes: 1 addition & 4 deletions tina/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ 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";
process.env.GITHUB_BRANCH;

export default defineConfig({
branch,
Expand Down

0 comments on commit 15f10b0

Please sign in to comment.