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 }} >