Compare commits
24 Commits
9ea02be452
...
42419e2e3b
| Author | SHA1 | Date | |
|---|---|---|---|
| 42419e2e3b | |||
| b1adbe74de | |||
| 241db688c2 | |||
| 7f12cb59d8 | |||
| 0cb9867bc7 | |||
| 97d9a04b29 | |||
| 97737def29 | |||
| ef67915621 | |||
| 040178e395 | |||
| 01f6a07672 | |||
| 10508f5ecd | |||
| 5fe9376533 | |||
| f694284c29 | |||
| 414b59ddb1 | |||
| 63f906bb02 | |||
| 194b0b58ed | |||
| 9b17385043 | |||
| 7875b8edef | |||
| e17829e7fa | |||
| 1e634ed122 | |||
| 16131521bc | |||
| 741720ed07 | |||
| 4ae7e7968b | |||
| 90e6842d71 |
65
.github/workflows/ci.yml
vendored
Normal file
65
.github/workflows/ci.yml
vendored
Normal 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
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
# Ignore artifacts:
|
|
||||||
build
|
|
||||||
coverage
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"tabWidth": 4,
|
|
||||||
"useTabs": false
|
|
||||||
}
|
|
||||||
@@ -1,5 +1,4 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://biomejs.dev/schemas/2.1.2/schema.json",
|
|
||||||
"vcs": {
|
"vcs": {
|
||||||
"enabled": false,
|
"enabled": false,
|
||||||
"clientKind": "git",
|
"clientKind": "git",
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
1
pipeline/build-image.sh
Executable file
@@ -0,0 +1 @@
|
|||||||
|
#!/bin/bash
|
||||||
@@ -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();
|
||||||
|
|||||||
@@ -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";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user