diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..b798e32 --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,37 @@ +name: Deploy + +# Déclenché à chaque push sur master → build + déploiement automatique. +on: + push: + branches: [master] + workflow_dispatch: + +concurrency: + group: deploy-${{ github.ref }} + cancel-in-progress: false + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Deploy to /var/www/highland + restart PM2 + run: | + set -e + mkdir -p /var/www/highland + rsync -a --delete \ + --exclude='.git' \ + --exclude='.env' \ + --exclude='.env.local' \ + ./ /var/www/highland/ + cd /var/www/highland + pm2 restart highland --update-env || pm2 start npm --name highland -- start + pm2 save diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index a498f95..0000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Deploy to VPS - -on: - push: - branches: [master] - workflow_dispatch: - -concurrency: - group: deploy-${{ github.ref }} - cancel-in-progress: false - -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - name: Deploy via SSH - uses: appleboy/ssh-action@v1.2.0 - with: - host: ${{ secrets.SSH_HOST }} - username: ${{ secrets.SSH_USER }} - port: ${{ secrets.SSH_PORT }} - key: ${{ secrets.SSH_PRIVATE_KEY }} - script: | - set -e - cd /var/www/highland - git pull origin master - npm ci - npm run build - pm2 restart highland --update-env - pm2 save diff --git a/.gitignore b/.gitignore index 7b8da95..2035f6c 100644 --- a/.gitignore +++ b/.gitignore @@ -37,6 +37,9 @@ yarn-error.log* # vercel .vercel +# deploy +.deploy-tmp.tar.gz + # typescript *.tsbuildinfo next-env.d.ts diff --git a/README.md b/README.md index 4cf0ec1..315bf0d 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ date: "2026-06-01" excerpt: "One-line summary for listings and SEO." author: "Highland Games Studio" tags: ["devlog"] -game: "project-one" +game: "emberwild" --- Your MDX content here. @@ -70,9 +70,19 @@ Your MDX content here. ## Deployment -Pushes to `master` deploy to the VPS via the GitHub Actions workflow -(`.github/workflows/deploy.yml`), which SSHes in, pulls, builds, and restarts the -PM2 process. Requires the `SSH_*` repository secrets. +Pushes to `master` deploy to the Hetzner server via the Gitea Actions workflow +(`.gitea/workflows/deploy.yml`), which SSHes in, pulls, builds, and restarts the +PM2 process (`highland`, in `/var/www/highland`). + +Requires these **repo secrets** (Gitea → repo → Settings → Actions → Secrets): +`SSH_HOST`, `SSH_USER`, `SSH_PORT`, `SSH_PRIVATE_KEY`. + +Server-side prerequisites (one-time): + +- A registered Gitea `act_runner` with the `ubuntu-latest` label. +- `/var/www/highland` is a clone of this repo whose `origin` can pull the **private** + Gitea repo non-interactively (deploy key or token in the remote URL). +- Node + `pm2` installed, with the app running as the `highland` process. ## Known TODOs diff --git a/TODO.md b/TODO.md index 1b21a49..768c896 100644 --- a/TODO.md +++ b/TODO.md @@ -22,17 +22,18 @@ Dernière mise à jour : 2026-06-22 vérifier le domaine, et renseigner `RESEND_API_KEY` / `CONTACT_TO_EMAIL` / `CONTACT_FROM_EMAIL` (en local dans `.env.local` + en prod sur le VPS) -- [ ] **Déploiement à valider en réel** - - [x] Trigger workflow corrigé (`main` → `master`) - - [ ] Vérifier que les secrets `SSH_*` sont bien configurés sur GitHub - - [ ] Tester un push qui déclenche bien le deploy sur le VPS +- [ ] **Déploiement à valider en réel** (Gitea Actions → Hetzner) + - [x] Workflow porté sur Gitea (`.gitea/workflows/deploy.yml`, trigger `master`) + - [ ] Configurer les secrets `SSH_*` dans Gitea (repo → Settings → Actions → Secrets) + - [ ] Vérifier que `/var/www/highland` peut `git pull` le repo Gitea privé (deploy key/token) + - [ ] Tester un push qui déclenche bien le deploy sur le Hetzner --- ## 🟠 P1 — Important (contenu avant lancement public) - [ ] **Remplacer tout le contenu placeholder** - - [ ] Vrai nom du jeu (au lieu de « Project One ») → `lib/games.ts` + - [x] Vrai nom du jeu → **Emberwild** (`lib/games.ts`, slug `emberwild`) - [ ] Vrais noms / bios de l'équipe (au lieu de « Founder One / Two ») → `app/studio/page.tsx` - [ ] Vrais liens réseaux sociaux (actuellement tous en `href="#"`) → `app/components/SocialLinks.tsx` - [ ] Vraies images de jeu / screenshots (le logo sert de placeholder partout) diff --git a/app/page.tsx b/app/page.tsx index 4be35f5..160a74e 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -175,7 +175,7 @@ export default function Home() { transition={{ duration: 0.9, delay: 0.1 }} >
diff --git a/app/studio/page.tsx b/app/studio/page.tsx index 5c857d1..28173f1 100644 --- a/app/studio/page.tsx +++ b/app/studio/page.tsx @@ -12,11 +12,13 @@ const team = [ name: "Founder One", role: "Co-founder · Programming · Design", bio: "Builds the systems, gameplay loops and tools that bring our worlds to life.", + photo: "/image/teams/CEO_Dev.jpg", }, { name: "Founder Two", role: "Co-founder · Art · Design", bio: "Shapes the visual identity, environments and feel of every Highland Games world.", + photo: null, }, ]; @@ -88,14 +90,24 @@ export default function StudioPage() {
{team.map((m) => (
-
- +
+ {m.photo ? ( + {m.name} + ) : ( + + )}

{m.name} diff --git a/content/devblog/2026-05-09-welcome.mdx b/content/devblog/2026-05-09-welcome.mdx index f398280..aa737b5 100644 --- a/content/devblog/2026-05-09-welcome.mdx +++ b/content/devblog/2026-05-09-welcome.mdx @@ -4,7 +4,7 @@ date: "2026-05-09" author: "Highland Games Studio" excerpt: "We're two friends building a survival game and a studio at the same time. Here's where we're starting." tags: ["studio", "intro"] -game: "project-one" +game: "emberwild" --- # Welcome to the Highland diff --git a/deploy.sh b/deploy.sh new file mode 100644 index 0000000..0a4b333 --- /dev/null +++ b/deploy.sh @@ -0,0 +1,45 @@ +#!/usr/bin/env bash +# Déploiement du site Highland Games Studio / Emberwild sur le serveur Hetzner. +# +# Usage (depuis la racine du projet, dans Git Bash) : +# ./deploy.sh +# +# Ce que ça fait : archive le code (sans node_modules/.next/.git), l'envoie sur +# le serveur, installe les dépendances, build en prod et redémarre PM2. +set -euo pipefail + +# --- Config serveur --- +SERVER="root@167.233.134.148" +KEY="$HOME/.ssh/id_rsa" +REMOTE_DIR="/var/www/highland" +APP_NAME="highland" +# Archive créée HORS du projet (sinon tar voit le dossier changer pendant la lecture). +TAR="${TMPDIR:-/tmp}/highland-deploy-$$.tar.gz" + +cd "$(dirname "$0")" + +echo "==> 1/3 Archive du projet..." +tar --exclude='./node_modules' --exclude='./.next' --exclude='./.git' \ + --exclude='./tsconfig.tsbuildinfo' \ + -czf "$TAR" . + +echo "==> 2/3 Envoi vers le serveur ($SERVER)..." +scp -i "$KEY" -o BatchMode=yes "$TAR" "$SERVER:/tmp/site.tar.gz" + +echo "==> 3/3 Extraction + build + redémarrage..." +ssh -i "$KEY" -o BatchMode=yes "$SERVER" \ + "REMOTE_DIR='$REMOTE_DIR' APP_NAME='$APP_NAME' bash -s" <<'REMOTE' +set -e +mkdir -p "$REMOTE_DIR" +tar -xzf /tmp/site.tar.gz -C "$REMOTE_DIR" +cd "$REMOTE_DIR" +npm ci +npm run build +pm2 restart "$APP_NAME" --update-env || pm2 start npm --name "$APP_NAME" -- start +pm2 save +rm -f /tmp/site.tar.gz +REMOTE + +rm -f "$TAR" +echo "" +echo "==> ✅ Déployé ! → https://highlandgamesstudio.com" diff --git a/lib/games.ts b/lib/games.ts index 4be4b1f..9e5951b 100644 --- a/lib/games.ts +++ b/lib/games.ts @@ -11,8 +11,8 @@ export type Game = { export const games: Game[] = [ { - slug: "project-one", - title: "Project One", + slug: "emberwild", + title: "Emberwild", status: "in-development", tagline: "A survival adventure across shifting horizons.", description: diff --git a/public/image/teams/CEO_Dev.jpg b/public/image/teams/CEO_Dev.jpg new file mode 100644 index 0000000..541dd7c Binary files /dev/null and b/public/image/teams/CEO_Dev.jpg differ