Merge branch 'main' into feature/updates
All checks were successful
Build Check / build-check (push) Successful in 4m5s
Build Check / build-check (pull_request) Successful in 9m5s

This commit is contained in:
Decobus 2025-07-16 06:51:36 +03:00
commit a8b88b8622
5 changed files with 98 additions and 94 deletions

View file

@ -2,7 +2,10 @@
"permissions": { "permissions": {
"allow": [ "allow": [
"Bash(find:*)", "Bash(find:*)",
"Bash(ls:*)" "Bash(ls:*)",
"Bash(mv:*)",
"Bash(git checkout:*)",
"Bash(git add:*)"
], ],
"deny": [] "deny": []
} }

View file

@ -17,24 +17,18 @@ concurrency:
jobs: jobs:
build-check: build-check:
runs-on: ubuntu-latest runs-on: self-hosted
permissions: permissions:
contents: read contents: read
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: https://code.forgejo.org/actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: 'npm'
- name: Install dependencies - name: Install dependencies
run: npm ci run: npm ci
- name: Restore Next.js cache - name: Restore Next.js cache
uses: actions/cache@v4 uses: https://code.forgejo.org/actions/cache@v4
with: with:
path: | path: |
.next/cache .next/cache

View file

@ -16,19 +16,13 @@ concurrency:
jobs: jobs:
build-and-deploy: build-and-deploy:
runs-on: ubuntu-latest runs-on: self-hosted
permissions: permissions:
id-token: write id-token: write
contents: read contents: read
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: https://code.forgejo.org/actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: 'npm'
- name: Create .env.local file - name: Create .env.local file
run: | run: |
@ -39,7 +33,7 @@ jobs:
run: npm ci run: npm ci
- name: Restore Next.js cache - name: Restore Next.js cache
uses: actions/cache@v4 uses: https://code.forgejo.org/actions/cache@v4
with: with:
path: | path: |
.next/cache .next/cache
@ -54,12 +48,20 @@ jobs:
run: npm run build:static run: npm run build:static
- name: Configure AWS credentials - name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4 # Note: aws-actions/configure-aws-credentials is GitHub-specific
with: # For Forgejo, we'll use environment variables directly
role-to-assume: ${{ secrets.CC_OIDC_ROLE }} env:
aws-region: us-east-1 AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-east-1
run: |
echo "AWS credentials configured via environment variables"
- name: Deploy to S3 - name: Deploy to S3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-east-1
run: | run: |
aws s3 sync out/ s3://${{ secrets.S3_BUCKET_NAME }} --delete --no-cli-pager aws s3 sync out/ s3://${{ secrets.S3_BUCKET_NAME }} --delete --no-cli-pager

View file

@ -21,6 +21,10 @@ npm run start # Start production server
# Quality Checks # Quality Checks
npm run lint # Run Next.js linting npm run lint # Run Next.js linting
npm run typecheck # Run TypeScript type checking 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 ## Architecture Overview
@ -29,7 +33,7 @@ npm run typecheck # Run TypeScript type checking
- **App Router**: Uses Next.js App Router in `src/app/` - **App Router**: Uses Next.js App Router in `src/app/`
- **Pages**: Homepage, Gallery (YouTube videos), Dadvocate (curated videos), Long Story - **Pages**: Homepage, Gallery (YouTube videos), Dadvocate (curated videos), Long Story
- **Static Generation**: Pages use static generation with ISR for external data - **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 ### Key Patterns
1. **UI Components**: Full shadcn/ui component library in `src/components/ui/` 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 - **YouTube API**: Gallery and Dadvocate pages fetch video data with 1-hour cache
- **AI Integration**: Genkit setup exists but is minimally implemented - **AI Integration**: Genkit setup exists but is minimally implemented
- **Theme**: Dark/light mode support via next-themes - **Theme**: Dark/light mode support via next-themes
- **Pre-commit**: Husky runs linting before commits
### Adding Features ### Adding Features
- New pages: Create directory in `src/app/` with `page.tsx` and metadata export - 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 - **Language**: TypeScript
- **UI Components**: shadcn/ui component library - **UI Components**: shadcn/ui component library
- **Styling**: Tailwind CSS with custom theming - **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) - **AI Integration**: Google Genkit (minimal implementation)
## 📋 Prerequisites ## 📋 Prerequisites
@ -30,7 +30,7 @@ A Next.js application built to expose harmful activities and support Kristen Jac
1. Clone the repository: 1. Clone the repository:
```bash ```bash
git clone https://github.com/yourusername/cheatingchelsea.git git clone ssh://gitea@git.deco.sh/signal-works/cheatingchelsea.git
cd cheatingchelsea cd cheatingchelsea
``` ```
@ -86,8 +86,8 @@ npm run start
This application supports multiple deployment platforms: This application supports multiple deployment platforms:
### GitHub Pages ### Static Hosting (AWS S3)
The project includes GitHub Actions workflow for automatic deployment to GitHub Pages. The project includes CI/CD workflow for automatic deployment to AWS S3.
### Firebase App Hosting ### Firebase App Hosting
Deploy using Firebase CLI: Deploy using Firebase CLI:
@ -96,7 +96,7 @@ firebase deploy
``` ```
### Vercel ### Vercel
Deploy directly from GitHub repository through Vercel dashboard or CLI. Deploy directly from Git repository through Vercel dashboard or CLI.
## 📁 Project Structure ## 📁 Project Structure