16 Commits

Author SHA1 Message Date
040178e395 manual trigger for ci
All checks were successful
CI / lint (push) Successful in 10s
CI / build (push) Successful in 10s
CI / build-and-push-docker (push) Successful in 14s
2025-08-28 18:06:36 +02:00
01f6a07672 use password to login
All checks were successful
CI / lint (push) Successful in 9s
CI / build (push) Successful in 10s
CI / build-and-push-docker (push) Successful in 14s
2025-08-28 16:02:05 +02:00
10508f5ecd add debug code in ci.yml
Some checks failed
CI / lint (push) Successful in 8s
CI / build (push) Successful in 10s
CI / build-and-push-docker (push) Failing after 13s
2025-08-28 15:59:00 +02:00
5fe9376533 use docker compose instead of docker in ci.yml
Some checks failed
CI / lint (push) Successful in 9s
CI / build (push) Successful in 10s
CI / build-and-push-docker (push) Failing after 13s
2025-08-28 15:55:12 +02:00
f694284c29 fix false username in ci.yml
Some checks failed
CI / lint (push) Successful in 8s
CI / build (push) Successful in 10s
CI / build-and-push-docker (push) Failing after 12s
2025-08-28 15:51:06 +02:00
414b59ddb1 quick commit
Some checks failed
CI / build (push) Successful in 9s
CI / lint (push) Successful in 17s
CI / build-and-push-docker (push) Failing after 25s
2025-08-28 15:48:32 +02:00
63f906bb02 update server on main changes
Some checks failed
CI / lint (push) Successful in 10s
CI / build (push) Successful in 9s
Build Docker Image / build-and-push-docker (push) Has been cancelled
2025-08-28 15:47:45 +02:00
194b0b58ed fix typo in url
All checks were successful
CI / build (push) Successful in 10s
CI / lint (push) Successful in 16s
Build Docker Image / build-and-push-docker (push) Successful in 11s
2025-08-28 13:36:27 +02:00
9b17385043 also push image
Some checks failed
CI / build (push) Successful in 11s
CI / lint (push) Successful in 7s
Build Docker Image / build-and-push-docker (push) Failing after 19s
2025-08-28 13:32:51 +02:00
7875b8edef add docker build.yml
All checks were successful
CI / build (push) Successful in 10s
CI / lint (push) Successful in 8s
Build Docker Image / build-docker (push) Successful in 55s
2025-08-28 13:28:01 +02:00
e17829e7fa create github action
All checks were successful
CI / build (push) Successful in 19s
CI / lint (push) Successful in 8s
2025-08-28 13:08:32 +02:00
1e634ed122 Merge branch 'runner' into 'main'
Runner

See merge request arifhasanic/monitor-im-flur!1
2025-08-27 22:02:55 +00:00
16131521bc remove tags from gitlab yaml 2025-08-27 23:38:47 +02:00
741720ed07 add build image script 2025-08-27 23:34:53 +02:00
4ae7e7968b fix gitlab ci yml 2025-08-27 22:54:09 +02:00
90e6842d71 setup ci, fix files using biome 2025-08-27 22:51:50 +02:00
11 changed files with 88 additions and 24 deletions

65
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,65 @@
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
container:
image: oven/bun
steps:
- uses: actions/checkout@v4
- name: Install Biome
run: bun install -g biome
- name: Biome Check
run: biome check
- name: Biome Lint
run: biome lint
build:
runs-on: ubuntu-latest
needs: lint
container:
image: oven/bun
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: bun install
- name: Build
run: bun run build
build-and-push-docker:
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Log in to Docker Registry
uses: docker/login-action@v2
with:
registry: git.rivercry.com
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build Docker image
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:
host: rivercry.com
port: 20022
username: docker
password: ${{ secrets.GARRISON_DOCKER_PASSWORD }}
script: |
cd monitor-im-flur
echo "Deploying Docker container..."
docker-compose pull
docker-compose stop || true
docker-compose rm || true
docker-compose up -d

View File

@@ -1,3 +0,0 @@
# Ignore artifacts:
build
coverage

View File

@@ -1,4 +0,0 @@
{
"tabWidth": 4,
"useTabs": false
}

View File

@@ -1,5 +1,4 @@
{ {
"$schema": "https://biomejs.dev/schemas/2.1.2/schema.json",
"vcs": { "vcs": {
"enabled": false, "enabled": false,
"clientKind": "git", "clientKind": "git",

View File

@@ -1,6 +1,6 @@
services: services:
monitor-im-flur: monitor-im-flur:
build: . image: git.rivercry.com/wg/monitor-im-flur:latest
ports: ports:
- "9123:5173" - "9123:5173"
restart: unless-stopped restart: unless-stopped

View File

@@ -1,9 +1,9 @@
import js from "@eslint/js"; import js from "@eslint/js";
import globals from "globals"; import { globalIgnores } from "eslint/config";
import reactHooks from "eslint-plugin-react-hooks"; import reactHooks from "eslint-plugin-react-hooks";
import reactRefresh from "eslint-plugin-react-refresh"; import reactRefresh from "eslint-plugin-react-refresh";
import globals from "globals";
import tseslint from "typescript-eslint"; import tseslint from "typescript-eslint";
import { globalIgnores } from "eslint/config";
export default tseslint.config([ export default tseslint.config([
globalIgnores(["dist"]), globalIgnores(["dist"]),

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

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

View File

@@ -1,12 +1,14 @@
const token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJkMjQ1OTg0YjliYzE0OTNjYTdmZDJmNTA3ODgzN2U1YSIsImlhdCI6MTc1MzQwMjAzNiwiZXhwIjoyMDY4NzYyMDM2fQ.fnLSFKPdk8lkAEB-4ekdGUJ1PSCBxcAyasQF1PyrD3k"; const token =
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJkMjQ1OTg0YjliYzE0OTNjYTdmZDJmNTA3ODgzN2U1YSIsImlhdCI6MTc1MzQwMjAzNiwiZXhwIjoyMDY4NzYyMDM2fQ.fnLSFKPdk8lkAEB-4ekdGUJ1PSCBxcAyasQF1PyrD3k";
async function fetchTentHumidity() { async function fetchTentHumidity() {
const url = "/api/states/sensor.third_reality_inc_3rths0224z_luftfeuchtigkeit_2"; const url =
"/api/states/sensor.third_reality_inc_3rths0224z_luftfeuchtigkeit_2";
const response = await fetch(url, { const response = await fetch(url, {
method: "GET", method: "GET",
headers: { headers: {
"Authorization": `Bearer ${token}`, Authorization: `Bearer ${token}`,
} },
}); });
const data = await response.json(); const data = await response.json();
@@ -18,8 +20,8 @@ async function fetchTentTemperature() {
const response = await fetch(url, { const response = await fetch(url, {
method: "GET", method: "GET",
headers: { headers: {
"Authorization": `Bearer ${token}`, Authorization: `Bearer ${token}`,
} },
}); });
const data = await response.json(); const data = await response.json();

View File

@@ -1,5 +1,5 @@
import { useFlatasticStore } from "@/store/flatastic";
import { useEffect } from "react"; import { useEffect } from "react";
import { useFlatasticStore } from "@/store/flatastic";
import type { FlatasticChore } from "@/types/flatasticChore"; import type { FlatasticChore } from "@/types/flatasticChore";

View File

@@ -2,8 +2,12 @@ import { useEffect } from "react";
import { useHomeAssistantStore } from "@/store/homeAssistant"; import { useHomeAssistantStore } from "@/store/homeAssistant";
export default function Timetable() { export default function Timetable() {
const fetchHomeAssistantData = useHomeAssistantStore((state) => state.fetch); const fetchHomeAssistantData = useHomeAssistantStore(
const tentTemperature = useHomeAssistantStore((state) => state.tentTemperature); (state) => state.fetch,
);
const tentTemperature = useHomeAssistantStore(
(state) => state.tentTemperature,
);
const tentHumidity = useHomeAssistantStore((state) => state.tentHumidity); const tentHumidity = useHomeAssistantStore((state) => state.tentHumidity);
useEffect(() => { useEffect(() => {