Skip to content

Commit

Permalink
prepare environment
Browse files Browse the repository at this point in the history
  • Loading branch information
yannbf committed May 6, 2024
1 parent ebc0321 commit d7ab14e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ jobs:
- name: Install dependencies
run: pnpm install

- name: Prepare environment
run: |
pnpm run prisma:setup
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
SESSION_KEY: ${{ secrets.SESSION_KEY }}
OAUTH_CLIENT_KEY: ${{ secrets.OAUTH_CLIENT_KEY }}
OAUTH_CLIENT_SECRET: ${{ secrets.OAUTH_CLIENT_SECRET }}

- name: Run Chromatic
uses: chromaui/action@latest
with:
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,16 @@ This application uses Prisma with SQLite. You need to set it up before running:
### Running the app locally

1. `pnpm install`
2. `pnpm dev`
2. `pnpm prisma:setup` (if you haven't already)
3. `pnpm dev`

Go to `localhost:3000`.

### Running Storybook locally

1. `pnpm install`
2. `pnpm storybook`
2. `pnpm prisma:setup` (if you haven't already)
3. `pnpm storybook`

Go to `localhost:6006`.

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@
"./*.tsx"
]
},
"type": "module",
"scripts": {
"build": "next build",
"dev": "next dev",
"lint": "next lint",
"start": "next start",
"prisma:setup": "dotenv -e .env.local prisma migrate dev",
"prisma:setup": "dotenv -e .env.local prisma migrate dev && pnpm run generate-dmmf",
"prisma:seed": "dotenv -e .env.local prisma db seed",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
Expand Down

0 comments on commit d7ab14e

Please sign in to comment.