Prepare for Node hosting migration and update dependencies

- Update all dependencies to latest (Astro 7, Vite 8, Sanity 6,
  @sanity/client 8, TypeScript 6; TS 7 blocked by @astrojs/check)
- Move build-only packages to devDependencies so a production
  install only pulls the 7 runtime packages
- Add @types/node so `astro check` passes
- Add `start` script and require Node >= 22.12
- Serve homepage content through the 1-minute in-memory cache
- Remove Gitea workflow that deployed to the old Kubernetes cluster

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
JohannesandClaude Opus 5.5 committed 2026-10-09 13:28:47 +02:00
1 parent e3cdb466a3
commit 2285fe813a
4 files changed
+7095 -8359

No files matched your search

-59
View File
@@ -1,59 +0,0 @@
name: Build and Deploy
on:
push:
branches:
- main
env:
REGISTRY: git.idealconnected.com
ORG: johannes.gasser
APP: theater-ziefen
GITOPS_REPO: cloud-hosting
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Set image tag
id: tag
run: echo "sha=${GITHUB_SHA::12}" >> "$GITHUB_OUTPUT"
- name: Log in to Gitea container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ gitea.actor }}
password: ${{ secrets.CI_TOKEN }}
- name: Build and push frontend image
uses: docker/build-push-action@v5
with:
context: .
target: frontend
push: true
tags: |
${{ env.REGISTRY }}/${{ env.ORG }}/${{ env.APP }}:${{ steps.tag.outputs.sha }}
${{ env.REGISTRY }}/${{ env.ORG }}/${{ env.APP }}:latest
- name: Update image tags in gitops repo
env:
CI_TOKEN: ${{ secrets.CI_TOKEN }}
SHA: ${{ steps.tag.outputs.sha }}
run: |
git config --global user.email "ci@idealconnected.com"
git config --global user.name "Gitea CI"
git clone \
"https://${{ gitea.actor }}:${CI_TOKEN}@${{ env.REGISTRY }}/${{ env.ORG }}/${{ env.GITOPS_REPO }}.git" \
/tmp/gitops
cd /tmp/gitops
sed -i \
"s|image: ${{ env.REGISTRY }}/${{ env.ORG }}/${{ env.APP }}:.*|image: ${{ env.REGISTRY }}/${{ env.ORG }}/${{ env.APP }}:${SHA}|" \
"apps/${{ env.APP }}/deployment.yaml"
git add "apps/${{ env.APP }}/deployment.yaml"
git diff --cached --quiet && echo "No changes, skipping commit." && exit 0
git commit -m "ci: update ${{ env.APP }} to ${SHA}"
git push origin main
+7067 -8277
View File
File diff suppressed because it is too large. Load diff
+26 -21
View File
@@ -6,33 +6,38 @@
"dev": "astro dev", "dev": "astro dev",
"build": "astro check && astro build", "build": "astro check && astro build",
"preview": "astro preview", "preview": "astro preview",
"start": "HOST=0.0.0.0 PORT=${PORT:-3000} node dist/server/entry.mjs",
"astro": "astro", "astro": "astro",
"migrate": "node --env-file=.env scripts/migrate-to-sanity.mjs" "migrate": "node --env-file=.env scripts/migrate-to-sanity.mjs"
}, },
"dependencies": { "dependencies": {
"@astrojs/check": "^0.9.9", "@astrojs/node": "^11.1.7",
"@astrojs/node": "^10.1.1", "@portabletext/to-html": "^6.0.0",
"@astrojs/react": "^5.0.4", "@sanity/client": "^8.9.0",
"@lucide/astro": "^1.14.0",
"@portabletext/to-html": "^5.0.2",
"@sanity/astro": "^3.4.0",
"@sanity/client": "^7.22.0",
"@sanity/image-url": "^2.1.1", "@sanity/image-url": "^2.1.1",
"@sanity/vision": "^3.0.0", "astro": "^7.3.8",
"@tailwindcss/vite": "^4.2.4", "react": "^19.3.0",
"astro": "^6.2.1", "react-dom": "^19.3.0"
"node-addon-api": "^8.7.0",
"node-gyp": "^12.3.0",
"react": "^19.2.5",
"react-dom": "^19.2.5",
"react-is": "^19.0.0",
"sanity": "^5.24.0",
"styled-components": "^6.1.19",
"tailwindcss": "^4.2.4",
"typescript": "^5.6.3",
"vite": "^7"
}, },
"devDependencies": { "devDependencies": {
"@portabletext/markdown": "^1.2.0" "@astrojs/check": "^0.9.10",
"@astrojs/react": "^7.0.1",
"@lucide/astro": "^1.54.0",
"@portabletext/markdown": "^2.5.0",
"@sanity/astro": "^3.5.1",
"@sanity/vision": "^6.18.0",
"@tailwindcss/vite": "^4.3.3",
"@types/node": "^22.20.5",
"node-addon-api": "^8.9.2",
"node-gyp": "^13.1.0",
"react-is": "^19.3.0",
"sanity": "^6.18.0",
"styled-components": "^6.5.3",
"tailwindcss": "^4.3.3",
"typescript": "^6.0.3",
"vite": "^8.3.4"
},
"engines": {
"node": ">=22.12.0"
} }
} }
+2 -2
View File
@@ -3,7 +3,7 @@ import BaseLayout from '../layouts/BaseLayout.astro';
import AnchorNav from '../components/AnchorNav.astro'; import AnchorNav from '../components/AnchorNav.astro';
import TheaterSection from '../components/TheaterSection.astro'; import TheaterSection from '../components/TheaterSection.astro';
import PhotoGallery from '../components/PhotoGallery.astro'; import PhotoGallery from '../components/PhotoGallery.astro';
import { sanityClient } from '../sanity/client'; import { fetchWithCache } from '../sanity/client';
import { renderPortableText } from '../sanity/portableText'; import { renderPortableText } from '../sanity/portableText';
import { urlFor } from '../sanity/imageUrl'; import { urlFor } from '../sanity/imageUrl';
import { theaterHomepageQuery } from '../sanity/queries'; import { theaterHomepageQuery } from '../sanity/queries';
@@ -11,7 +11,7 @@ import { MapPin } from '@lucide/astro';
export const prerender = false export const prerender = false
const content = await sanityClient.fetch(theaterHomepageQuery) ?? {}; const content: any = await fetchWithCache(theaterHomepageQuery) ?? {};
--- ---
<BaseLayout title={content.title || 'Freilichttheater Ziefen 2028'}> <BaseLayout title={content.title || 'Freilichttheater Ziefen 2028'}>