Skip to content

Commit 67073d9

Browse files
committed
adding tinacms
1 parent 42c0852 commit 67073d9

File tree

98 files changed

+61329
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+61329
-1
lines changed

package-lock.json

Lines changed: 20493 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"@svgr/webpack": "^8.1.0",
1717
"@tinacms/cli": "^1.10.2",
1818
"@types/js-cookie": "^3.0.6",
19-
"@types/node": "^22.18.0",
19+
"@types/node": "^22.18.6",
2020
"@types/react": "^18.3.24",
2121
"@types/styled-components": "^5.1.34",
2222
"autoprefixer": "^10.4.21",

personal-website/.env.example

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# These are retrieved from your project at app.tina.io
2+
NEXT_PUBLIC_TINA_CLIENT_ID=***
3+
TINA_TOKEN=***
4+
5+
# This is set by default CI with Netlify/Vercel/Github, but can be overriden
6+
NEXT_PUBLIC_TINA_BRANCH=***
7+
# To see the preview functionality
8+
VERCEL_ENV=preview
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "npm" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "daily"
12+
allow:
13+
- dependency-name: "tinacms"
14+
- dependency-name: "@tinacms*"
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
# Sample workflow for building and deploying a Next.js site to GitHub Pages
2+
#
3+
# To get started with Next.js see: https://nextjs.org/docs/getting-started
4+
#
5+
name: Deploy Next.js site to Pages
6+
7+
on:
8+
# Runs on pushes targeting the default branch
9+
push:
10+
branches: [main]
11+
12+
# Allows you to run this workflow manually from the Actions tab
13+
workflow_dispatch:
14+
15+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
16+
permissions:
17+
contents: read
18+
pages: write
19+
id-token: write
20+
21+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
22+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
23+
concurrency:
24+
group: "pages"
25+
cancel-in-progress: false
26+
27+
jobs:
28+
# Build job
29+
build:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v4
34+
35+
- name: Detect package manager
36+
id: detect-package-manager
37+
run: |
38+
if [ -f "${{ github.workspace }}/yarn.lock" ]; then
39+
echo "✅ Detected yarn"
40+
echo "manager=yarn" >> $GITHUB_OUTPUT
41+
echo "command=install" >> $GITHUB_OUTPUT
42+
echo "runner=yarn" >> $GITHUB_OUTPUT
43+
exit 0
44+
elif [ -f "${{ github.workspace }}/pnpm-lock.yaml" ]; then
45+
echo "✅ Detected pnpm"
46+
echo "manager=pnpm" >> $GITHUB_OUTPUT
47+
echo "command=install" >> $GITHUB_OUTPUT
48+
echo "runner=pnpm" >> $GITHUB_OUTPUT
49+
exit 0
50+
elif [ -f "${{ github.workspace }}/package.json" ]; then
51+
echo "✅ Detected npm"
52+
echo "manager=npm" >> $GITHUB_OUTPUT
53+
echo "command=ci" >> $GITHUB_OUTPUT
54+
echo "runner=npx --no-install" >> $GITHUB_OUTPUT
55+
exit 0
56+
else
57+
echo "❌ Unable to determine package manager"
58+
exit 1
59+
fi
60+
61+
- name: Setup pnpm
62+
if: steps.detect-package-manager.outputs.manager == 'pnpm'
63+
uses: pnpm/action-setup@v4
64+
with:
65+
version: 9
66+
67+
- name: Setup Node
68+
uses: actions/setup-node@v4
69+
with:
70+
node-version-file: .nvmrc
71+
cache: ${{ steps.detect-package-manager.outputs.manager }}
72+
73+
- name: "Setup Pages #1"
74+
run: |
75+
touch public/.nojekyll
76+
- name: "Setup Pages #2"
77+
uses: actions/configure-pages@v5
78+
with:
79+
# Automatically inject basePath in your Next.js configuration file and disable
80+
# server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
81+
#
82+
# You may remove this line if you want to manage the configuration yourself.
83+
static_site_generator: next
84+
85+
- name: Restore cache
86+
uses: actions/cache@v4
87+
with:
88+
path: |
89+
.next/cache
90+
# Generate a new cache whenever packages or source files change.
91+
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/pnpm-lock.yaml', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
92+
# If source files changed but packages didn't, rebuild from a prior cache.
93+
restore-keys: |
94+
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/pnpm-lock.yaml', '**/yarn.lock') }}-
95+
96+
- name: Install dependencies
97+
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
98+
99+
- name: Build with Next.js
100+
run: ${{ steps.detect-package-manager.outputs.runner }} build
101+
env:
102+
NEXT_PUBLIC_TINA_CLIENT_ID: ${{ secrets.NEXT_PUBLIC_TINA_CLIENT_ID }}
103+
NEXT_PUBLIC_TINA_BRANCH: ${{ github.ref_name }}
104+
TINA_TOKEN: ${{ secrets.TINA_TOKEN }}
105+
106+
- name: Upload artifact
107+
uses: actions/upload-pages-artifact@v3
108+
with:
109+
path: ./out
110+
111+
# Deployment job
112+
deploy:
113+
environment:
114+
name: github-pages
115+
url: ${{ steps.deployment.outputs.page_url }}
116+
runs-on: ubuntu-latest
117+
needs: build
118+
steps:
119+
- name: Deploy to GitHub Pages
120+
id: deployment
121+
uses: actions/deploy-pages@v4
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Build Pull request
2+
on:
3+
pull_request:
4+
types: [opened, synchronize, reopened]
5+
env:
6+
NEXT_PUBLIC_TINA_CLIENT_ID: ${{ secrets.NEXT_PUBLIC_TINA_CLIENT_ID }}
7+
TINA_TOKEN: ${{ secrets.TINA_TOKEN }}
8+
NEXT_PUBLIC_TINA_BRANCH: ${{ github.head_ref }}
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
name: Build sample
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Setup node
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version-file: .nvmrc
19+
20+
- uses: pnpm/action-setup@v4
21+
name: Install pnpm
22+
id: pnpm-install
23+
with:
24+
version: 9
25+
run_install: false
26+
27+
- name: Get pnpm store directory
28+
id: pnpm-cache
29+
shell: bash
30+
run: |
31+
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
32+
33+
- uses: actions/cache@v4
34+
name: Setup pnpm cache
35+
with:
36+
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
37+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
38+
restore-keys: |
39+
${{ runner.os }}-pnpm-store-
40+
41+
- name: Install dependencies
42+
run: pnpm install
43+
44+
- name: Build
45+
run: pnpm build
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Update TinaCMS Dependencies
2+
on:
3+
push:
4+
branches:
5+
- dependabot/npm_and_yarn/**
6+
7+
jobs:
8+
update-tinacms:
9+
runs-on: ubuntu-latest
10+
steps:
11+
# Clone repo
12+
- name: Check out repo to update
13+
uses: actions/checkout@v2
14+
- name: Setup node
15+
uses: actions/setup-node@v3
16+
with:
17+
node-version: 18
18+
# Install deps, update Tina packages, update schema
19+
- name: Install dependencies
20+
run: yarn install
21+
- name: Update Tina packages
22+
run: yarn upgrade tinacms@latest @tinacms/cli@latest
23+
- name: Update Schema
24+
run: yarn tinacms audit
25+
# Commit changes
26+
- name: Commit changes back to branch
27+
uses: EndBug/add-and-commit@v9
28+
with:
29+
message: "Update TinaCMS generated files"
30+
branch: ${{ github.ref }}
31+
committer_name: GitHub Actions
32+
committer_email: actions@github.com

personal-website/.gitignore

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
# dependencies
3+
/node_modules
4+
/.pnp
5+
.pnp.js
6+
7+
# testing
8+
/coverage
9+
10+
# next.js
11+
/.next/
12+
/out/
13+
next-env.d.ts
14+
15+
# production
16+
/build
17+
18+
# misc
19+
.DS_Store
20+
.env
21+
.env.local
22+
.idea
23+
24+
# debug
25+
npm-debug.log*
26+
yarn-debug.log*
27+
yarn-error.log*
28+
29+
.tina/__generated__

personal-website/.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v22
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["graphql.vscode-graphql", "biomejs.biome"]
3+
}

0 commit comments

Comments
 (0)