Merge branch 'main' - resolve settings.local.json conflict
Some checks failed
Deploy / deploy (push) Failing after 14s
CI / test (push) Has been cancelled

This commit is contained in:
Derek Slenk 2025-07-16 11:31:16 -04:00
commit 44a4a42a30
10 changed files with 91 additions and 167 deletions

29
.forgejo/workflows/ci.yml Normal file
View file

@ -0,0 +1,29 @@
name: CI
on:
push:
branches: [ main, master, feature/* ]
pull_request:
branches: [ main, master ]
jobs:
test:
runs-on: self-hosted
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
run: npm ci
- name: Run linting
run: npm run lint
- name: Run type checking
run: npm run typecheck
- name: Build application
run: npm run build
env:
# Use empty string for YOUTUBE_API_KEY during CI build
YOUTUBE_API_KEY: ""

View file

@ -0,0 +1,41 @@
name: Deploy
on:
push:
branches: [ main, master ]
workflow_dispatch:
jobs:
deploy:
runs-on: self-hosted
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
run: npm ci
- name: Build application
run: npm run build
env:
# Access YouTube API key from repository secrets
YOUTUBE_API_KEY: ${{ secrets.YOUTUBE_API_KEY }}
- name: Deploy to S3 (if configured)
run: |
if [ -n "${{ secrets.AWS_ACCESS_KEY_ID }}" ]; then
echo "Deploying to S3..."
npm run deploy:s3
else
echo "AWS credentials not configured, skipping S3 deployment"
fi
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
- name: Upload build artifacts
uses: https://codeberg.org/actions/upload-artifact@v3
with:
name: build-output
path: out/

View file

@ -1,66 +0,0 @@
# Workflow for building and testing Next.js site on non-master branches
name: Build Check
on:
# Runs on pushes to any branch except master
push:
branches-ignore: ["master"]
# Runs on pull requests targeting any branch
pull_request:
branches: ["*"]
# Allow multiple concurrent build checks
concurrency:
group: "build-check-${{ github.ref }}"
cancel-in-progress: true
jobs:
build-check:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Restore Next.js cache
uses: actions/cache@v4
with:
path: |
.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
- name: Run linting
run: npm run lint
- name: Build Next.js site
run: npm run build
- name: Run tests (if available)
run: |
if npm run test --if-present; then
echo "✅ Tests passed"
else
echo " No tests found or tests skipped"
fi
continue-on-error: true
- name: Build verification complete
run: |
echo "🎉 Build verification successful!"
echo "✅ Dependencies installed"
echo "✅ Linting passed"
echo "✅ Build completed successfully"
echo "Ready for review and merge!"

View file

@ -1,70 +0,0 @@
# Workflow for building and deploying a Next.js site to AWS S3
name: Deploy Next.js site to S3
on:
# Runs on pushes targeting the default branch
push:
branches: ["master"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
concurrency:
group: "s3-deployment"
cancel-in-progress: false
jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: 'npm'
- name: Create .env.local file
run: |
echo "YOUTUBE_API_KEY=${{ secrets.YOUTUBE_API_KEY }}" > .env.local
echo "S3_BUCKET_NAME=${{ secrets.S3_BUCKET_NAME }}" >> .env.local
- name: Install dependencies
run: npm ci
- name: Restore Next.js cache
uses: actions/cache@v4
with:
path: |
.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
- name: Build Next.js site
env:
YOUTUBE_API_KEY: ${{ secrets.YOUTUBE_API_KEY }}
S3_BUCKET_NAME: ${{ secrets.S3_BUCKET_NAME }}
run: npm run build:static
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.CC_OIDC_ROLE }}
aws-region: us-east-1
- name: Deploy to S3
run: |
aws s3 sync out/ s3://${{ secrets.S3_BUCKET_NAME }} --delete --no-cli-pager
- name: Output deployment URL
run: |
echo "🎉 Deployment successful!"
echo "S3 website URL: http://${{ secrets.S3_BUCKET_NAME }}.s3-website-us-east-1.amazonaws.com"
echo "Note: Site will be served through CloudFlare proxy for production"

View file

@ -21,6 +21,10 @@ npm run start # Start production server
# Quality Checks
npm run lint # Run Next.js linting
npm run typecheck # Run TypeScript type checking
# Deployment
npm run deploy:s3 # Deploy to AWS S3 bucket
npm run create-s3-bucket # Create S3 bucket for deployment
```
## Architecture Overview
@ -29,7 +33,7 @@ npm run typecheck # Run TypeScript type checking
- **App Router**: Uses Next.js App Router in `src/app/`
- **Pages**: Homepage, Gallery (YouTube videos), Dadvocate (curated videos), Long Story
- **Static Generation**: Pages use static generation with ISR for external data
- **Deployment**: Supports GitHub Pages, Firebase App Hosting, and Vercel
- **Deployment**: Supports Static hosting (S3), Firebase App Hosting, and Vercel
### Key Patterns
1. **UI Components**: Full shadcn/ui component library in `src/components/ui/`
@ -43,6 +47,7 @@ npm run typecheck # Run TypeScript type checking
- **YouTube API**: Gallery and Dadvocate pages fetch video data with 1-hour cache
- **AI Integration**: Genkit setup exists but is minimally implemented
- **Theme**: Dark/light mode support via next-themes
- **Pre-commit**: Husky runs linting before commits
### Adding Features
- New pages: Create directory in `src/app/` with `page.tsx` and metadata export

View file

@ -17,7 +17,7 @@ A Next.js application built to expose harmful activities and support Kristen Jac
- **Language**: TypeScript
- **UI Components**: shadcn/ui component library
- **Styling**: Tailwind CSS with custom theming
- **Hosting**: Supports GitHub Pages, Firebase App Hosting, and Vercel
- **Hosting**: Supports Static hosting (S3), Firebase App Hosting, and Vercel
- **AI Integration**: Google Genkit (minimal implementation)
## 📋 Prerequisites
@ -30,7 +30,7 @@ A Next.js application built to expose harmful activities and support Kristen Jac
1. Clone the repository:
```bash
git clone https://github.com/yourusername/cheatingchelsea.git
git clone ssh://gitea@git.deco.sh/signal-works/cheatingchelsea.git
cd cheatingchelsea
```
@ -86,8 +86,8 @@ npm run start
This application supports multiple deployment platforms:
### GitHub Pages
The project includes GitHub Actions workflow for automatic deployment to GitHub Pages.
### Static Hosting (AWS S3)
The project includes CI/CD workflow for automatic deployment to AWS S3.
### Firebase App Hosting
Deploy using Firebase CLI:
@ -96,7 +96,7 @@ firebase deploy
```
### Vercel
Deploy directly from GitHub repository through Vercel dashboard or CLI.
Deploy directly from Git repository through Vercel dashboard or CLI.
## 📁 Project Structure

View file

@ -3,7 +3,6 @@ import type { Metadata } from 'next';
import { Button } from '@/components/ui/button';
import Link from 'next/link';
import { ExternalLink } from 'lucide-react';
import { Footer } from '@/components/Footer';
export const metadata: Metadata = {
title: "Video Gallery - Community Coverage of Chelsea Smallwood",
@ -85,8 +84,6 @@ export default async function GalleryPage() {
const videos = await getYouTubeVideos(videoIds);
return (
<div className="flex flex-col min-h-screen bg-background text-foreground">
<main className="flex-grow">
<div className="container mx-auto max-w-5xl py-12 px-4 sm:px-6 lg:px-8">
<header className="text-center mb-12">
<h1 className="text-4xl sm:text-5xl font-extrabold tracking-tight text-primary font-headline">
@ -129,9 +126,5 @@ export default async function GalleryPage() {
</Button>
</div>
</div>
</main>
<Footer />
</div>
);
}

View file

@ -3,6 +3,7 @@ import { Inter } from 'next/font/google';
import './globals.css';
import { Toaster } from '@/components/ui/toaster';
import { ThemeProvider } from '@/components/theme-provider';
import { Footer } from '@/components/Footer';
const inter = Inter({ subsets: ['latin'] });
@ -71,7 +72,12 @@ export default function RootLayout({
enableSystem
disableTransitionOnChange
>
<div className="flex flex-col min-h-screen bg-background text-foreground">
<main className="flex-grow">
{children}
</main>
<Footer />
</div>
<Toaster />
</ThemeProvider>
</body>

View file

@ -7,7 +7,6 @@ import {
CardHeader,
} from '@/components/ui/card';
import Link from 'next/link';
import { Footer } from '@/components/Footer';
export const metadata: Metadata = {
title: "The Full Story: Chelsea Smallwood's Controversial Empire",
description: "A deep dive into how Chelsea Smallwood built a business on monetizing infidelity, the controversy surrounding 'The Other Woman and the Wife,' and the serious allegations of cyberbullying and harassment in the Kristen Jacobs lawsuit.",
@ -15,8 +14,6 @@ export const metadata: Metadata = {
export default function LongStoryPage() {
return (
<div className="flex flex-col min-h-screen bg-background text-foreground">
<main className="flex-grow">
<div className="container mx-auto max-w-4xl py-12 px-4 sm:px-6 lg:px-8">
<header className="text-center mb-12">
<h1 className="text-4xl sm:text-5xl font-extrabold tracking-tight text-primary font-headline">
@ -200,9 +197,5 @@ export default function LongStoryPage() {
</div>
</div>
</div>
</main>
<Footer />
</div>
);
}

View file

@ -8,12 +8,9 @@ import {
CardHeader,
} from '@/components/ui/card';
import Link from 'next/link';
import { Footer } from '@/components/Footer';
export default function Home() {
return (
<div className="flex flex-col min-h-screen bg-background text-foreground">
<main className="flex-grow">
<div className="container mx-auto max-w-4xl py-12 px-4 sm:px-6 lg:px-8">
<header className="text-center mb-12">
<h1 className="text-4xl sm:text-5xl font-extrabold tracking-tight text-primary font-headline">
@ -175,9 +172,5 @@ export default function Home() {
</Card>
</div>
</div>
</main>
<Footer />
</div>
);
}