diff --git a/.env.local b/.env.local new file mode 100644 index 0000000..ff2e041 --- /dev/null +++ b/.env.local @@ -0,0 +1 @@ +NEXT_PUBLIC_API_URL=http://65.109.100.181:8080 diff --git a/.env.production b/.env.production new file mode 100644 index 0000000..fcc76b9 --- /dev/null +++ b/.env.production @@ -0,0 +1 @@ +NEXT_PUBLIC_BASE_URL=https://smithyhelen.github.io/woth-toolbox diff --git a/.github/workflows/nextjs.yml b/.github/workflows/nextjs.yml index b79b29e..9118fdc 100644 --- a/.github/workflows/nextjs.yml +++ b/.github/workflows/nextjs.yml @@ -1,10 +1,10 @@ name: Deploy site to Github Pages -# Runs when pushing new tags +# Runs when pushing to main branch on: push: - tags: - - 'v[0-9]+.[0-9]+.[0-9]+' + branches: + - main # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages permissions: @@ -48,43 +48,13 @@ jobs: if: steps.cache.outputs.cache-hit != 'true' run: pnpm install - lint: - name: Lint code - runs-on: ubuntu-latest - needs: deps - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Restore application dependencies - uses: actions/cache/restore@v4 - with: - key: ${{ runner.os }}-node-modules-${{ hashFiles('pnpm-lock.yaml') }} - path: | - node_modules - fail-on-cache-miss: true - - name: Install pnpm - uses: pnpm/action-setup@v3 - with: - version: 9 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: 20 - cache: pnpm - - - name: Perform code linting - run: pnpm lint # Build job build: name: Build runs-on: ubuntu-latest environment: production - needs: - - lint steps: - name: Checkout uses: actions/checkout@v4 @@ -111,12 +81,8 @@ jobs: - name: Configure GitHub Pages uses: actions/configure-pages@v4 - 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: Configure output cache uses: actions/cache@v4 @@ -131,15 +97,9 @@ jobs: - name: Export static application assets env: - NEXT_PUBLIC_BASE_PATH: ${{ vars.NEXT_PUBLIC_BASE_PATH }} - NEXT_PUBLIC_BASE_URL: ${{ vars.NEXT_PUBLIC_BASE_URL }} - NEXT_PUBLIC_FIREBASE_API_KEY: ${{ vars.NEXT_PUBLIC_FIREBASE_API_KEY }} - NEXT_PUBLIC_FIREBASE_APP_ID: ${{ vars.NEXT_PUBLIC_FIREBASE_APP_ID }} - NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN: ${{ vars.NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN }} - NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID: ${{ vars.NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID }} - NEXT_PUBLIC_FIREBASE_PROJECT_ID: ${{ vars.NEXT_PUBLIC_FIREBASE_PROJECT_ID }} - NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET: ${{ vars.NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET }} - NEXT_PUBLIC_GOOGLE_ANALYTICS: ${{ vars.NEXT_PUBLIC_GOOGLE_ANALYTICS }} + NEXT_PUBLIC_BASE_PATH: "/woth-toolbox" + NEXT_PUBLIC_BASE_URL: "https://smithyhelen.github.io/woth-toolbox" + NEXT_PUBLIC_API_URL: "http://65.109.100.181:8080" run: pnpm build - name: Upload assets as artifacts diff --git a/README.md b/README.md index 01ddc87..701ee93 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,19 @@ +# WOTH Toolbox - Discord Enhanced 🦌 + +> This is a fork of [codeaid/woth-toolbox](https://github.com/codeaid/woth-toolbox) with Discord integration for personal herd tracking. + +## Discord Integration Features +- Login with Discord to see your personally tracked herds on the maps +- Automatic map filtering - only shows herds from the currently selected map +- Color-coded markers: 🏆 Trophy, ✅ Leave, ⏳ Monitor, ❌ Cull +- Real-time sync with your Discord bot's database + +## Credits +- **Original WOTH Toolbox** by [codeaid](https://github.com/codeaid) +- **Map Data** courtesy of Nine Rocks Games and THQ Nordic +- **Discord Integration** for "Antlers in the Mist" community + +---  This interactive web application contains a suite of tools that can be used diff --git a/next.config.js b/next.config.js index cf1a011..a0393ee 100644 --- a/next.config.js +++ b/next.config.js @@ -21,6 +21,8 @@ const getLocalIdentHash = (context, localIdentName, localName) => /** @type {import('next').NextConfig} */ const config = { basePath: process.env.NEXT_PUBLIC_BASE_PATH, + + // Don't run linter during production builds eslint: { ignoreDuringBuilds: true, }, diff --git a/src/app/layout.tsx b/src/app/layout.tsx index d60f129..edfc816 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,5 +1,6 @@ import { GoogleAnalytics } from '@next/third-parties/google'; import clsx from 'clsx'; +import ClientDiscordAuth from 'components/ClientDiscordAuth'; import type { Metadata, Viewport } from 'next'; import type { PropsWithChildren } from 'react'; import { @@ -45,6 +46,7 @@ const RootLayout = (props: PropsWithChildren) => ( >