diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..15dd66d2 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,62 @@ +name: CI Pipeline + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + services: + # Menjalankan PostgreSQL sebagai service di GitHub Actions + postgres: + image: postgres:14 + env: + POSTGRES_USER: ${{ secrets.POSTGRES_USER }} + POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }} + POSTGRES_DB: ${{ secrets.POSTGRES_DB }} + ports: + - 5432:5432 + options: >- + --health-cmd="pg_isready" + --health-interval=10s + --health-timeout=5s + --health-retries=5 + + steps: + # Checkout kode sumber + - name: Checkout code + uses: actions/checkout@v3 + + # Setup Bun + - name: Setup Bun + uses: oven-sh/setup-bun@v1 + + # Install dependencies + - name: Install dependencies + run: bun install + + # Konfigurasi environment variable untuk PostgreSQL dan variabel tambahan + - name: Set up environment variables + run: | + echo "DATABASE_URL=postgresql://${{ secrets.POSTGRES_USER }}:${{ secrets.POSTGRES_PASSWORD }}@localhost:5432/${{ secrets.POSTGRES_DB }}?schema=public" >> .env + echo "PORT=${{ secrets.PORT }}" >> .env + echo "NEXT_PUBLIC_WIBU_URL=${{ secrets.NEXT_PUBLIC_WIBU_URL }}" >> .env + echo "WIBU_UPLOAD_DIR=${{ secrets.WIBU_UPLOAD_DIR }}" >> .env + + # Migrasi database menggunakan Prisma + - name: Apply Prisma schema to database + run: bun prisma db push + + # Seed database (opsional) + - name: Seed database + run: bun prisma db seed + + # Build project + - name: Build project + run: bun run build diff --git a/.gitignore b/.gitignore index 157b8563..fa5f03cd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,3 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - # dependencies /node_modules /.pnp @@ -30,7 +28,7 @@ yarn-debug.log* yarn-error.log* .pnpm-debug.log* -# env files (can opt-in for committing if needed) +# env .env* # vercel @@ -46,3 +44,4 @@ next-env.d.ts # cache /cache +.github/ diff --git a/README.md b/README.md index e215bc4c..9bdfb5c0 100644 --- a/README.md +++ b/README.md @@ -1,36 +1 @@ -This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app). - -## Getting Started - -First, run the development server: - -```bash -npm run dev -# or -yarn dev -# or -pnpm dev -# or -bun dev -``` - -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. - -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. - -This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel. - -## Learn More - -To learn more about Next.js, take a look at the following resources: - -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. - -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome! - -## Deploy on Vercel - -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. - -Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. +Failed to Generate README \ No newline at end of file diff --git a/package.json b/package.json index 5d93f96e..d6976f97 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,11 @@ "dev": "next dev --turbopack", "build": "next build", "start": "next start", - "lint": "next lint" + "lint": "next lint", + "prisma:seed": "bun run prisma/seed.ts" + }, + "prisma": { + "seed": "bun run prisma/seed.ts" }, "dependencies": { "@elysiajs/cors": "^1.2.0", diff --git a/prisma/schema.prisma b/prisma/schema.prisma index c8bf996a..b3991450 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -1,9 +1,3 @@ -// This is your Prisma schema file, -// learn more about it in the docs: https://pris.ly/d/prisma-schema - -// Looking for ways to speed up your queries, or scale easily with your serverless or edge functions? -// Try Prisma Accelerate: https://pris.ly/cli/accelerate-init - generator client { provider = "prisma-client-js" } diff --git a/uploads/image/apa.png b/uploads/image/apa.png new file mode 100644 index 00000000..4e65fa18 Binary files /dev/null and b/uploads/image/apa.png differ diff --git a/uploads/image/bg-blur.png b/uploads/image/bg-blur.png new file mode 100644 index 00000000..894d28dc Binary files /dev/null and b/uploads/image/bg-blur.png differ diff --git a/uploads/image/bg-slide-2.png b/uploads/image/bg-slide-2.png new file mode 100644 index 00000000..83e5b79e Binary files /dev/null and b/uploads/image/bg-slide-2.png differ diff --git a/uploads/image/bg-slide-3.png b/uploads/image/bg-slide-3.png new file mode 100644 index 00000000..6b159cad Binary files /dev/null and b/uploads/image/bg-slide-3.png differ diff --git a/uploads/image/bg-slide.png b/uploads/image/bg-slide.png new file mode 100644 index 00000000..0d63dd37 Binary files /dev/null and b/uploads/image/bg-slide.png differ diff --git a/uploads/image/bg.png b/uploads/image/bg.png new file mode 100644 index 00000000..650ee76c Binary files /dev/null and b/uploads/image/bg.png differ diff --git a/uploads/image/darmasaba-icon.png b/uploads/image/darmasaba-icon.png new file mode 100644 index 00000000..0fad186e Binary files /dev/null and b/uploads/image/darmasaba-icon.png differ diff --git a/uploads/image/gambar.jpg b/uploads/image/gambar.jpg new file mode 100644 index 00000000..9fc0a437 Binary files /dev/null and b/uploads/image/gambar.jpg differ diff --git a/uploads/image/perbekel.png b/uploads/image/perbekel.png new file mode 100644 index 00000000..ed1cbd10 Binary files /dev/null and b/uploads/image/perbekel.png differ diff --git a/uploads/image/pudak-icon.png b/uploads/image/pudak-icon.png new file mode 100644 index 00000000..50051447 Binary files /dev/null and b/uploads/image/pudak-icon.png differ diff --git a/uploads/image/screen-shot-2025-02-08-at-11-40-54.png b/uploads/image/screen-shot-2025-02-08-at-11-40-54.png new file mode 100644 index 00000000..d5ac5506 Binary files /dev/null and b/uploads/image/screen-shot-2025-02-08-at-11-40-54.png differ diff --git a/uploads/image/spash.png b/uploads/image/spash.png new file mode 100644 index 00000000..c3cfb585 Binary files /dev/null and b/uploads/image/spash.png differ diff --git a/uploads/image/tps-3-r-pudak-mesari-olah-sampah-organik-300-kilogra-800-2023-01-12-091459-0.jpg b/uploads/image/tps-3-r-pudak-mesari-olah-sampah-organik-300-kilogra-800-2023-01-12-091459-0.jpg new file mode 100644 index 00000000..dfc558ba Binary files /dev/null and b/uploads/image/tps-3-r-pudak-mesari-olah-sampah-organik-300-kilogra-800-2023-01-12-091459-0.jpg differ diff --git a/uploads/image/tps.png b/uploads/image/tps.png new file mode 100644 index 00000000..dfc558ba Binary files /dev/null and b/uploads/image/tps.png differ diff --git a/xx.ts b/xx.ts index 343c1168..ce37cc2d 100644 --- a/xx.ts +++ b/xx.ts @@ -1,4 +1,2 @@ -import path from "path"; - // percobaan -console.log(path.basename("/apa/kanar.png", ".png")) \ No newline at end of file +console.log(path.basename("/apa/kanar.png", ".png"))