スキル一覧に戻る
rebyteai-template

build-and-deploy

by rebyteai-template

Natural Language Postgres Presentation Template

0🍴 0📅 2025年11月27日
GitHubで見るManusで実行

SKILL.md


name: build-and-deploy description: Build and deploy this Next.js presentation application with PostgreSQL database. Use when building, deploying, setting up database, or preparing the project for production. Triggers on requests to build, deploy, seed database, or publish.

Build and Deploy Natural Language Postgres Presentation

Workflow

1. Setup Environment Variables

Read .env.example to see all required variables:

cat .env.example

Create .env by reading values from current environment:

For each variable in .env.example, read the value from the current environment and write to .env. Example approach:

# Read .env.example and create .env with values from current environment
while IFS= read -r line || [[ -n "$line" ]]; do
  # Skip comments and empty lines
  [[ "$line" =~ ^#.*$ || -z "$line" ]] && continue
  # Extract variable name (before = sign)
  var_name=$(echo "$line" | cut -d'=' -f1)
  # Get value from environment
  var_value="${!var_name}"
  # Write to .env
  echo "${var_name}=${var_value}" >> .env
done < .env.example

Or manually inspect .env.example and create .env with the required values from environment variables.

2. Install Dependencies

pnpm install

3. Seed Database

pnpm run seed

Critical: Must run after database provisioning. Seeds database with unicorn companies data from unicorns.csv (~1000+ records).

Database Schema:

  • Single table: unicorns
  • Contains: company, valuation, date_joined, country, city, industry, investors

4. Build

pnpm run build

5. Deploy

Vercel:

All vercel CLI commands require -t <token> or --token <token> for authentication.

# Pull project settings (also links project, creates .vercel/project.json)
vercel pull --yes -t $VERCEL_TOKEN

# Push env vars to Vercel (first time only)
# Must add to each environment separately
while IFS='=' read -r key value; do
  [[ "$key" =~ ^#.*$ || -z "$key" || -z "$value" ]] && continue
  for env in production preview development; do
    printf '%s' "$value" | vercel env add "$key" $env -t $VERCEL_TOKEN
  done
done < .env

# Build locally for production
vercel build --prod -t $VERCEL_TOKEN

# Deploy prebuilt
vercel deploy --prebuilt --prod --yes -t $VERCEL_TOKEN

Netlify:

# Set platform env vars (first time only)
netlify env:import .env

# Deploy
netlify deploy --prod

Critical Notes

  • Seed Required: Must run pnpm run seed after database setup
  • Database: PostgreSQL required
  • Environment Variables: All values come from current environment - inspect .env.example for required variables
  • No Dev Server: Never run pnpm dev in VM environment

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です