From a939c6ed65f7474af90f1695d881ed438bd68ff3 Mon Sep 17 00:00:00 2001 From: Decobus Date: Thu, 10 Jul 2025 18:43:35 -0400 Subject: [PATCH] Migrate from GitHub to Forgejo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Rename .github directory to .forgejo - Update workflow actions to use Forgejo-specific URLs - Change runners from ubuntu-latest to self-hosted - Replace GitHub-specific AWS action with environment variables - Update documentation references from GitHub to Forgejo/git.deco.sh 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- .claude/settings.local.json | 19 ++++++++------- .../workflows/build-check.yml | 8 +++---- {.github => .forgejo}/workflows/nextjs.yml | 24 ++++++++++++------- CLAUDE.md | 7 +++++- README.md | 10 ++++---- 5 files changed, 42 insertions(+), 26 deletions(-) rename {.github => .forgejo}/workflows/build-check.yml (86%) rename {.github => .forgejo}/workflows/nextjs.yml (71%) diff --git a/.claude/settings.local.json b/.claude/settings.local.json index a9873cd..853c2f1 100644 --- a/.claude/settings.local.json +++ b/.claude/settings.local.json @@ -1,9 +1,12 @@ -{ - "permissions": { - "allow": [ - "Bash(find:*)", - "Bash(ls:*)" - ], - "deny": [] - } +{ + "permissions": { + "allow": [ + "Bash(find:*)", + "Bash(ls:*)", + "Bash(mv:*)", + "Bash(git checkout:*)", + "Bash(git add:*)" + ], + "deny": [] + } } \ No newline at end of file diff --git a/.github/workflows/build-check.yml b/.forgejo/workflows/build-check.yml similarity index 86% rename from .github/workflows/build-check.yml rename to .forgejo/workflows/build-check.yml index be9b9f5..9a22e5b 100644 --- a/.github/workflows/build-check.yml +++ b/.forgejo/workflows/build-check.yml @@ -17,15 +17,15 @@ concurrency: jobs: build-check: - runs-on: ubuntu-latest + runs-on: self-hosted permissions: contents: read steps: - name: Checkout - uses: actions/checkout@v4 + uses: https://code.forgejo.org/actions/checkout@v4 - name: Setup Node.js - uses: actions/setup-node@v4 + uses: https://code.forgejo.org/actions/setup-node@v4 with: node-version: "20" cache: 'npm' @@ -34,7 +34,7 @@ jobs: run: npm ci - name: Restore Next.js cache - uses: actions/cache@v4 + uses: https://code.forgejo.org/actions/cache@v4 with: path: | .next/cache diff --git a/.github/workflows/nextjs.yml b/.forgejo/workflows/nextjs.yml similarity index 71% rename from .github/workflows/nextjs.yml rename to .forgejo/workflows/nextjs.yml index 15444af..ae8b552 100644 --- a/.github/workflows/nextjs.yml +++ b/.forgejo/workflows/nextjs.yml @@ -16,16 +16,16 @@ concurrency: jobs: build-and-deploy: - runs-on: ubuntu-latest + runs-on: self-hosted permissions: id-token: write contents: read steps: - name: Checkout - uses: actions/checkout@v4 + uses: https://code.forgejo.org/actions/checkout@v4 - name: Setup Node.js - uses: actions/setup-node@v4 + uses: https://code.forgejo.org/actions/setup-node@v4 with: node-version: "20" cache: 'npm' @@ -39,7 +39,7 @@ jobs: run: npm ci - name: Restore Next.js cache - uses: actions/cache@v4 + uses: https://code.forgejo.org/actions/cache@v4 with: path: | .next/cache @@ -54,12 +54,20 @@ jobs: 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 + # Note: aws-actions/configure-aws-credentials is GitHub-specific + # For Forgejo, we'll use environment variables directly + 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: | + echo "AWS credentials configured via environment variables" - 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: | aws s3 sync out/ s3://${{ secrets.S3_BUCKET_NAME }} --delete --no-cli-pager diff --git a/CLAUDE.md b/CLAUDE.md index 12b3e59..e6c79c9 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -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 diff --git a/README.md b/README.md index 507fd4f..ac01785 100644 --- a/README.md +++ b/README.md @@ -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