Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .changeset/dependencies-GH-100.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@
:arrow_up: Bump react-dom from 19.2.3 to 19.2.4

Bumps [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom) from 19.2.3 to 19.2.4.

- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v19.2.4/packages/react-dom)

---

updated-dependencies:

- dependency-name: react-dom
dependency-version: 19.2.4
dependency-type: direct:production
update-type: version-update:semver-patch
...
...

Signed-off-by: dependabot[bot] <support@github.com>
5 changes: 4 additions & 1 deletion .changeset/dependencies-GH-101.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@
:arrow_up: Bump maplibre-gl from 5.16.0 to 5.17.0

Bumps [maplibre-gl](https://github.com/maplibre/maplibre-gl-js) from 5.16.0 to 5.17.0.

- [Release notes](https://github.com/maplibre/maplibre-gl-js/releases)
- [Changelog](https://github.com/maplibre/maplibre-gl-js/blob/main/CHANGELOG.md)
- [Commits](https://github.com/maplibre/maplibre-gl-js/compare/v5.16.0...v5.17.0)

---

updated-dependencies:

- dependency-name: maplibre-gl
dependency-version: 5.17.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
...

Signed-off-by: dependabot[bot] <support@github.com>
5 changes: 4 additions & 1 deletion .changeset/dependencies-GH-102.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@
:arrow_up: Bump baseline-browser-mapping from 2.9.17 to 2.9.19

Bumps [baseline-browser-mapping](https://github.com/web-platform-dx/baseline-browser-mapping) from 2.9.17 to 2.9.19.

- [Release notes](https://github.com/web-platform-dx/baseline-browser-mapping/releases)
- [Commits](https://github.com/web-platform-dx/baseline-browser-mapping/compare/v2.9.17...v2.9.19)

---

updated-dependencies:

- dependency-name: baseline-browser-mapping
dependency-version: 2.9.19
dependency-type: direct:development
update-type: version-update:semver-patch
...
...

Signed-off-by: dependabot[bot] <support@github.com>
5 changes: 4 additions & 1 deletion .changeset/dependencies-GH-103.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@
:arrow_up: Bump eslint-config-next from 16.1.4 to 16.1.6

Bumps [eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next) from 16.1.4 to 16.1.6.

- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/commits/v16.1.6/packages/eslint-config-next)

---

updated-dependencies:

- dependency-name: eslint-config-next
dependency-version: 16.1.6
dependency-type: direct:development
update-type: version-update:semver-patch
...
...

Signed-off-by: dependabot[bot] <support@github.com>
5 changes: 4 additions & 1 deletion .changeset/dependencies-GH-104.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@
:arrow_up: Bump lucide-react from 0.562.0 to 0.563.0

Bumps [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) from 0.562.0 to 0.563.0.

- [Release notes](https://github.com/lucide-icons/lucide/releases)
- [Commits](https://github.com/lucide-icons/lucide/commits/0.563.0/packages/lucide-react)

---

updated-dependencies:

- dependency-name: lucide-react
dependency-version: 0.563.0
dependency-type: direct:production
update-type: version-update:semver-minor
...
...

Signed-off-by: dependabot[bot] <support@github.com>
6 changes: 4 additions & 2 deletions .changeset/dependencies-GH-96.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,20 @@

Bumps the npm_and_yarn group with 1 update in the / directory: [next](https://github.com/vercel/next.js).


Updates `next` from 16.1.4 to 16.1.5

- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/compare/v16.1.4...v16.1.5)

---

updated-dependencies:

- dependency-name: next
dependency-version: 16.1.5
dependency-type: direct:production
dependency-group: npm_and_yarn
...
...

Signed-off-by: dependabot[bot] <support@github.com>
6 changes: 5 additions & 1 deletion .changeset/dependencies-GH-98.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,20 @@
Bumps [react](https://github.com/facebook/react/tree/HEAD/packages/react) and [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react). These dependencies needed to be updated together.

Updates `react` from 19.2.3 to 19.2.4

- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v19.2.4/packages/react)

Updates `@types/react` from 19.2.9 to 19.2.10

- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

---

updated-dependencies:

- dependency-name: react
dependency-version: 19.2.4
dependency-type: direct:production
Expand All @@ -25,6 +29,6 @@ updated-dependencies:
dependency-version: 19.2.10
dependency-type: direct:development
update-type: version-update:semver-patch
...
...

Signed-off-by: dependabot[bot] <support@github.com>
5 changes: 4 additions & 1 deletion .changeset/dependencies-GH-99.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@
:arrow_up: Bump simple-icons from 16.6.0 to 16.6.1

Bumps [simple-icons](https://github.com/simple-icons/simple-icons) from 16.6.0 to 16.6.1.

- [Release notes](https://github.com/simple-icons/simple-icons/releases)
- [Commits](https://github.com/simple-icons/simple-icons/compare/16.6.0...16.6.1)

---

updated-dependencies:

- dependency-name: simple-icons
dependency-version: 16.6.1
dependency-type: direct:production
update-type: version-update:semver-patch
...
...

Signed-off-by: dependabot[bot] <support@github.com>
37 changes: 37 additions & 0 deletions .github/scripts/create-release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,43 @@ async function createGitHubRelease() {
console.log(`\n🚀 Pushing changes...`);
execSync("git push origin prod", { stdio: "inherit" });
console.log(`✅ Successfully pushed changes`);

// Trigger the deployment workflow via repository_dispatch
console.log(`\n🔔 Triggering deployment workflow...`);
try {
// Validate GITHUB_TOKEN is available
if (!process.env.GITHUB_TOKEN) {
throw new Error(
"GITHUB_TOKEN is required to trigger deployment workflow",
);
}

const dispatchOctokit = new Octokit({
auth: process.env.GITHUB_TOKEN,
});

await dispatchOctokit.rest.repos.createDispatchEvent({
owner,
repo,
event_type: "deploy-to-pages",
client_payload: {
source: "release-workflow",
branch: "prod",
},
});
console.log(`✅ Deployment workflow triggered successfully`);
} catch (dispatchError) {
const errorMessage =
dispatchError instanceof Error
? dispatchError.message
: String(dispatchError);
console.warn(
`⚠️ Failed to trigger deployment workflow: ${errorMessage}`,
);
console.log(
"You can manually trigger the deployment from the Actions tab",
);
}
} catch (gitError) {
console.error("❌ Git operation failed:", gitError);
process.exit(1);
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/nextjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
push:
branches: ["prod"]

# Triggered by repository dispatch event from Release workflow
repository_dispatch:
types: [deploy-to-pages]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

Expand All @@ -30,6 +34,9 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v6
with:
# Checkout prod branch for repository_dispatch events, otherwise use default
ref: ${{ github.event_name == 'repository_dispatch' && 'prod' || github.ref }}
- name: Setup Node
uses: actions/setup-node@v6
with:
Expand All @@ -46,6 +53,9 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v6
with:
# Checkout prod branch for repository_dispatch events, otherwise use default
ref: ${{ github.event_name == 'repository_dispatch' && 'prod' || github.ref }}
- name: Detect package manager
id: detect-package-manager
run: |
Expand Down
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,32 @@ npm run dev

## 📦 Build & Deploy

Build for production:
### Production Build (for GitHub Pages)

Build for production deployment:

```bash
npm run build
```

The app is automatically deployed to GitHub Pages on every push to the `main` branch.
This creates an optimized static export in the `out` directory with the `/geo-invaders` base path configured for GitHub Pages.

### Local Testing Build

To build and test the production build locally:

```bash
npm run build:local
npm run start
```

The `build:local` script creates a build without the GitHub Pages base path, making it suitable for local testing at `http://localhost:3000`.

**Note:** Don't use `npm run build` followed by `npm run start` for local testing, as the production build includes the `/geo-invaders` base path and won't work correctly on localhost.

### Deployment

The app is automatically deployed to GitHub Pages on every push to the `prod` branch.

## 🤝 Contributing

Expand Down
7 changes: 5 additions & 2 deletions next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
const isProduction = process.env.NODE_ENV === "production";
// Use NODE_ENV to determine if this is a production build for GitHub Pages
// When NODE_ENV is "production", we're building for deployment to GitHub Pages
// Otherwise (including undefined/development), we're building for local testing
const isGitHubPagesBuild = process.env.NODE_ENV === "production";

const nextConfig = {
output: "export",
basePath: isProduction ? "/geo-invaders" : "",
basePath: isGitHubPagesBuild ? "/geo-invaders" : "",
};

export default nextConfig;
Loading