Skip to content

Commit

Permalink
Ci (#112)
Browse files Browse the repository at this point in the history
Any questions should be directed to @vujita

---

Replace any ":question:" below with information about your pull request.

## Pull Request Details

Provide details about your pull request and what it adds, fixes, or
changes.

:question:

## Breaking Changes

Describe what features are broken by this pull request and why, if any.

:question:

## Issues Fixed

Enter the issue numbers resolved by this pull request below, if any.

1. :question:

## Other Relevant Information

Provide any other important details below.

:question:

---------

Signed-off-by: Vu Nguyen <[email protected]>
  • Loading branch information
vujita authored Jan 6, 2024
1 parent 5db4fce commit 208b2c3
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 13 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/deploy-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,7 @@ jobs:
run: pnpm install --frozen-lockfile

- name: Build
run: pnpm turbo build

- name: Check workspaces
run: pnpm manypkg check
- name: Check prettier
run: pnpm run check
run: pnpm turbo build:storbook

- name: Deploy to GH Pages 🚀
uses: peaceiris/actions-gh-pages@v3
Expand Down
2 changes: 1 addition & 1 deletion apps/vubnguyen/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"dev": "pnpm with-env next dev",
"lint": "dotenv -v SKIP_ENV_VALIDATION=1 next lint",
"lint:fix": "pnpm lint -- --fix",
"preview": "pnpm with-env next start",
"dev:preview": "pnpm with-env next start",
"start": "pnpm with-env next start",
"type-check": "tsc --noEmit",
"e2e": "pnpm with-env playwright test",
Expand Down
2 changes: 1 addition & 1 deletion apps/vubnguyen/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default defineConfig({

/* Run your local dev server before starting the tests */
webServer: {
command: "pnpm run preview",
command: "pnpm run dev:preview",
reuseExistingServer: !process.env.CI,
url: "http://127.0.0.1:3000",
},
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"private": true,
"scripts": {
"build": "turbo build",
"build:storybook": "turbo build:storybook",
"check": "prettier --check \"**/*.{js,cjs,mjs,ts,tsx,md,json}\" --ignore-path .gitignore --ignore-path .eslintignore",
"clean": "git clean -xdf node_modules",
"clean:workspaces": "pnpx turbo clean",
Expand All @@ -11,6 +12,7 @@
"db:push": "turbo db:push",
"db:studio": "pnpm -F db dev",
"dev": "turbo dev --parallel",
"dev:preview": "turbo dev:preview",
"dev:db": "turbo dev --filter db",
"dev:extension": "turbo dev --filter perf-extension",
"dev:storybook": "turbo dev:storybook --parallel",
Expand Down
3 changes: 1 addition & 2 deletions packages/db/src/migrate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import env from "./env";
import * as schema from "./schema";

const applyMigrations = async () => {
const ssl = process.env.NODE_ENV === "production" ? { rejectUnauthorized: false } : undefined;
const migrationClient = postgres(env.DATABASE_URL, { max: 1, ssl });
const migrationClient = postgres(env.DATABASE_URL, { max: 1 });
const migrateDb = drizzle(migrationClient, { schema });
await migrate(migrateDb, { migrationsFolder: "drizzle" });
await migrationClient.end();
Expand Down
4 changes: 2 additions & 2 deletions packages/vujita-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"scripts": {
"build:clean": "rimraf ./*.mjs ./*.js ./*.mts ./*.d.ts ./*.map storybook-static",
"build:tsup": "tsup",
"build": "xrun -s build:clean build:tsup build-storybook",
"build-storybook": "pnpm storybook build",
"build": "xrun -s build:clean build:tsup",
"build:storybook": "pnpm storybook build",
"dev": "xrun dev:tsup",
"dev:storybook": "storybook dev -p 6006",
"dev:tsup": "tsup --watch",
Expand Down
11 changes: 10 additions & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@
"pipeline": {
"build": {
"dependsOn": ["^build"],
"outputs": [".next/**", ".expo/**", "dist/**", "storybook-static/**", "*.ts", "*.d.ts", "*.d.mts", "*.mts", "*.js", "*.map"]
"outputs": [".next/**", ".expo/**", "dist/**", "*.ts", "*.d.ts", "*.d.mts", "*.mts", "*.js", "*.map"]
},
"build:storybook": {
"dependsOn": ["^build"],
"outputs": ["storybook-static/**"]
},
"clean": {
"cache": false
Expand All @@ -31,6 +35,11 @@
"dependsOn": ["^build"],
"persistent": true
},
"dev:preview": {
"cache": false,
"dependsOn": ["build"],
"persistent": true
},
"dev:storybook": {
"cache": false,
"dependsOn": ["^build"],
Expand Down

0 comments on commit 208b2c3

Please sign in to comment.