diff --git a/.github/workflows/nextjs.yml b/.github/workflows/nextjs.yml index ab10e72..f7ce6d2 100644 --- a/.github/workflows/nextjs.yml +++ b/.github/workflows/nextjs.yml @@ -31,62 +31,30 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 - - name: Detect package manager - id: detect-package-manager - run: | - if [ -f "${{ github.workspace }}/pnpm-lock.yaml" ]; then - echo "manager=pnpm" >> $GITHUB_OUTPUT - echo "command=install" >> $GITHUB_OUTPUT - echo "runner=pnpm" >> $GITHUB_OUTPUT - exit 0 - elif [ -f "${{ github.workspace }}/yarn.lock" ]; then - echo "manager=yarn" >> $GITHUB_OUTPUT - echo "command=install" >> $GITHUB_OUTPUT - echo "runner=yarn" >> $GITHUB_OUTPUT - exit 0 - elif [ -f "${{ github.workspace }}/package.json" ]; then - echo "manager=npm" >> $GITHUB_OUTPUT - echo "command=ci" >> $GITHUB_OUTPUT - echo "runner=npx --no-install" >> $GITHUB_OUTPUT - exit 0 - else - echo "Unable to determine package manager" - exit 1 - fi - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: "20" - cache: ${{ steps.detect-package-manager.outputs.manager }} + - name: Setup pnpm - if: steps.detect-package-manager.outputs.manager == 'pnpm' uses: pnpm/action-setup@v2 with: version: 8 run_install: false - - name: Setup Pages - uses: actions/configure-pages@v5 - with: - # Automatically inject basePath in your Next.js configuration file and disable - # server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized). - # - # You may remove this line if you want to manage the configuration yourself. - static_site_generator: next - - name: Restore cache - uses: actions/cache@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 with: - path: | - .next/cache - ${{ steps.detect-package-manager.outputs.manager == 'pnpm' && '~/.pnpm-store' || '' }} - # Generate a new cache whenever packages or source files change. - key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml', '**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} - # If source files changed but packages didn't, rebuild from a prior cache. - restore-keys: | - ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml', '**/package-lock.json', '**/yarn.lock') }}- + node-version: "20" + cache: "pnpm" + + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + - name: Install dependencies - run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }} + run: pnpm install + - name: Build with Next.js - run: ${{ steps.detect-package-manager.outputs.runner }} next build + run: pnpm build + - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: diff --git a/public/.well-known/farcaster.json b/public/.well-known/farcaster.json new file mode 100644 index 0000000..c4607e0 --- /dev/null +++ b/public/.well-known/farcaster.json @@ -0,0 +1,17 @@ +{ + "frame": { + "version": "1", + "name": "Chain of Thorns", + "subtitle": "Rule, Strategize, Conquer.", + "description": "Enter a decentralized battlefield where negotiation and blockchain-powered strategy define your path to victory.", + "iconUrl": "https://chainofthrone.vercel.app/images/Logo.png", + "homeUrl": "https://chainofthrone.vercel.app/", + "imageUrl": "https://chainofthrone.vercel.app/images/open-graph.png", + "buttonTitle": "🚩 Start Battle", + "primaryCategorySchema": "games", + "splashImageUrl": "https://chainofthrone.vercel.app/images/splash.png", + "splashBackgroundColor": "#F5F5F5", + "requiredChains": ["eip155:10143"], + "requiredCapabilities": ["actions.signIn", "wallet.getEvmProvider"] + } +} diff --git a/public/.well-known/route.ts b/public/.well-known/route.ts deleted file mode 100644 index 67d8293..0000000 --- a/public/.well-known/route.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { NextResponse } from "next/server"; -import { APP_URL } from "@/lib/constants/contracts"; - -export async function GET() { - const farcasterConfig = { - frame: { - version: "1", - name: "Chain of Thorns", - subtitle: "Rule, Strategize, Conquer.", - description: - "Enter a decentralized battlefield where negotiation and blockchain-powered strategy define your path to victory.", - iconUrl: `${APP_URL}/images/icon.png`, - homeUrl: `${APP_URL}`, - imageUrl: `${APP_URL}/images/open-graph.png`, - buttonTitle: "🚩 Start Battle", - primaryCategorySchema: "games", - splashImageUrl: `${APP_URL}/images/splash.png`, - splashBackgroundColor: "#F5F5F5", - requiredChains: ["eip155:10143"], - requiredCapabilities: ["actions.signIn", "wallet.getEvmProvider"], - }, - }; - - return NextResponse.json(farcasterConfig); -}