1 Commits

Author SHA1 Message Date
e2d96a5bca Bouncing Amogus 2025-08-31 18:13:08 +02:00
10 changed files with 24 additions and 42 deletions

View File

@@ -18,8 +18,6 @@ jobs:
run: bun install
- name: Build
run: bun run build
- name: Write Git-Hash into html
run: ./pipeline/create-git-hash-html.sh
- name: Create Build Artifact
uses: christopherhx/gitea-upload-artifact@v4
with:
@@ -41,8 +39,8 @@ jobs:
- name: Run Biome
run: biome ci .
create-and-publish-docker-image:
needs: [lint]
build-and-push-docker:
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@@ -60,6 +58,7 @@ jobs:
run: docker build -t git.rivercry.com/wg/monitor-im-flur .
- name: Push Docker image
run: docker push git.rivercry.com/wg/monitor-im-flur
- name: Deploy via SSH
uses: appleboy/ssh-action@v0.1.10
with:
@@ -69,8 +68,7 @@ jobs:
password: ${{ secrets.GARRISON_DOCKER_PASSWORD }}
script: |
cd monitor-im-flur
hyprctl dispatch exec 'pkill firefox'
hyprctl dispatch exec 'firefox -kiosk localhost:9123'
echo "Deploying Docker container..."
git clean -dfx
git reset --hard HEAD
git pull

View File

@@ -1,5 +1,11 @@
FROM oven/bun as builder
WORKDIR /app
COPY . .
RUN bun install
RUN bun run build
FROM nginx:alpine
COPY ./dist /usr/share/nginx/html
COPY --from=builder /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/nginx.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

View File

@@ -1,12 +0,0 @@
#!/bin/sh
echo "Running pre-commit hooks..."
biome check --write
biome lint --write
if git diff --quiet; then
exit 0
else
git add -u
fi

View File

@@ -16,7 +16,7 @@ http {
index index.html;
location / {
try_files $uri $uri/ /index.html /git-hash.js;
try_files $uri $uri/ /index.html;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {

1
pipeline/build-image.sh Executable file
View File

@@ -0,0 +1 @@
#!/bin/bash

View File

@@ -1,11 +0,0 @@
#!/bin/sh
echo "<!DOCTYPE html>
<html>
<head>
<title>Git Hash</title>
</head>
<body>
<pre>GITHUB_SHA = '$GITHUB_SHA';</pre>
</body>
</html>" > dist/git-hash.html

View File

@@ -1,3 +0,0 @@
#!/bin/sh
git config --local core.hooksPath githooks

View File

@@ -1,7 +1,9 @@
import { useEffect, useState } from "react";
import style from "./style.module.css";
import amogus from "/img/amogus.png";
import imposter from "/img/imposter.png";
import style from "./style.module.css";
type Amogus = {
isImposter: boolean;
@@ -49,7 +51,7 @@ const makeCrewmate = (crewmate: Amogus) => {
const stepCrewmates = (list: Amogus[]) => {
const { innerWidth: width, innerHeight: height } = window;
const newCrewmates = list.slice();
for (const c of newCrewmates) {
for (let c of newCrewmates) {
let newX = c.posX + c.speedX;
let newY = c.posY + c.speedY;
if (newX > width - 90) {
@@ -79,13 +81,13 @@ export default function Amogus() {
useEffect(() => {
const timer = setInterval(() => {
const c = crewmates;
let c = crewmates;
setCrewmates(stepCrewmates(c));
}, 100);
return () => {
clearInterval(timer);
};
}, [crewmates]);
}, []);
return <>{crewmates.map((c) => makeCrewmate(c))}</>;
}

View File

@@ -1,7 +1,7 @@
import FourTwenty from "@components/FourTwenty/FourTwenty";
import classNames from "classnames";
import FourTwenty from "@components/FourTwenty/FourTwenty";
import { useEffect, useState } from "react";
import Amogus from "@/components/Amogus/Amogus";
import Card from "@/components/Card/Card";
import {
CardColumn,
@@ -13,6 +13,7 @@ import Footer from "@/components/Footer/Footer";
import Terminal from "@/components/Terminal/Terminal";
import Timetable from "@/components/Timetable/Timetable";
import Weather from "@/components/Weather/Weather";
import Amogus from "@/components/Amogus/Amogus";
import style from "./style.module.css";