Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: sanity setup #12

Merged
merged 5 commits into from
Nov 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 27 additions & 1 deletion .github/workflows/deploy-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
<table>
<tr>
<td><strong>Name</strong></td>
<td>Hack at UCI Site</td>
<td>IrvineHacks 2024 Site</td>
</tr>
<tr>
<td><strong>Preview</strong></td>
Expand All @@ -34,3 +34,29 @@ jobs:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ vars.VERCEL_ORG_ID}}
vercel-project-id: ${{ vars.VERCEL_PROJECT_ID_SITE}}
Studio:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: amondnet/vercel-action@v25
with:
vercel-version: 30.2.2
github-comment: |
<table>
<tr>
<td><strong>Name</strong></td>
<td>Sanity Studio</td>
</tr>
<tr>
<td><strong>Preview</strong></td>
<td><a href='{{deploymentUrl}}'>Visit Preview</a></td>
</tr>
<tr>
<td><strong>Commit</strong></td>
<td>{{deploymentCommit}}</td>
</tr>
</table>
github-token: ${{ secrets.GITHUB_TOKEN }}
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ vars.VERCEL_ORG_ID}}
vercel-project-id: ${{ vars.VERCEL_PROJECT_ID_STUDIO}}
12 changes: 12 additions & 0 deletions .github/workflows/deploy-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,15 @@ jobs:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ vars.VERCEL_ORG_ID}}
vercel-project-id: ${{ vars.VERCEL_PROJECT_ID_SITE}}
Studio:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: amondnet/vercel-action@v25
with:
vercel-version: 30.2.2
github-comment: false
vercel-args: "--prod"
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ vars.VERCEL_ORG_ID}}
vercel-project-id: ${{ vars.VERCEL_PROJECT_ID_STUDIO}}
3 changes: 3 additions & 0 deletions apps/sanity/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "@sanity/eslint-config-studio"
}
30 changes: 30 additions & 0 deletions apps/sanity/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# Dependencies
/node_modules
/.pnp
.pnp.js

# Compiled Sanity Studio
/dist

# Temporary Sanity runtime, generated by the CLI on every dev server start
/.sanity

# Logs
/logs
*.log

# Coverage directory used by testing tools
/coverage

# Misc
.DS_Store
*.pem

# Typescript
*.tsbuildinfo

# Dotenv and similar local-only files
*.local
.vercel
9 changes: 9 additions & 0 deletions apps/sanity/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Sanity Clean Content Studio

Congratulations, you have now installed the Sanity Content Studio, an open source real-time content editing environment connected to the Sanity backend.

Now you can do the following things:

- [Read “getting started” in the docs](https://www.sanity.io/docs/introduction/getting-started?utm_source=readme)
- [Join the community Slack](https://slack.sanity.io/?utm_source=readme)
- [Extend and build plugins](https://www.sanity.io/docs/content-studio/extending?utm_source=readme)
38 changes: 38 additions & 0 deletions apps/sanity/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "irvinehacks-site-2024",
"private": true,
"version": "1.0.0",
"main": "package.json",
"license": "UNLICENSED",
"scripts": {
"dev": "sanity dev",
"start": "sanity start",
"build": "sanity build",
"deploy": "sanity deploy",
"deploy-graphql": "sanity graphql deploy"
},
"keywords": [
"sanity"
],
"dependencies": {
"@sanity/vision": "^3.19.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-is": "^18.2.0",
"sanity": "^3.19.2",
"styled-components": "^6.0.7"
},
"devDependencies": {
"@sanity/eslint-config-studio": "^3.0.1",
"@types/react": "^18.0.25",
"eslint": "^8.6.0",
"prettier": "^3.0.2",
"typescript": "^5.1.6"
},
"prettier": {
"semi": false,
"printWidth": 100,
"bracketSpacing": false,
"singleQuote": true
}
}
8 changes: 8 additions & 0 deletions apps/sanity/sanity.cli.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import {defineCliConfig} from 'sanity/cli'

export default defineCliConfig({
api: {
projectId: 'fosuyru0',
dataset: 'production'
}
})
18 changes: 18 additions & 0 deletions apps/sanity/sanity.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import {defineConfig} from 'sanity'
import {deskTool} from 'sanity/desk'
import {visionTool} from '@sanity/vision'
import {schemaTypes} from './schemas'

export default defineConfig({
name: 'default',
title: 'irvinehacks-site-2024',

projectId: 'fosuyru0',
dataset: 'production',

plugins: [deskTool(), visionTool()],

schema: {
types: schemaTypes,
},
})
1 change: 1 addition & 0 deletions apps/sanity/schemas/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const schemaTypes = []
1 change: 1 addition & 0 deletions apps/sanity/static/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Files placed here will be served by the Sanity server under the `/static`-prefix
20 changes: 20 additions & 0 deletions apps/sanity/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"compilerOptions": {
"target": "ES2017",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true
},
"include": ["**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}
8 changes: 8 additions & 0 deletions apps/sanity/turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": ["//"],
"pipeline": {
"build": {
"outputs": ["dist/**"]
}
}
}
Loading
Loading