Compare commits
8 Commits
42419e2e3b
...
9ea02be452
| Author | SHA1 | Date | |
|---|---|---|---|
| 9ea02be452 | |||
| af70a8f2e7 | |||
| f40ab6eb63 | |||
| 7f8fee99ce | |||
| db934eb9e7 | |||
| 0205916b0a | |||
| 64a33fcd31 | |||
| 17cc07a684 |
65
.github/workflows/ci.yml
vendored
65
.github/workflows/ci.yml
vendored
@@ -1,65 +0,0 @@
|
|||||||
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
|
|
||||||
3
.prettierignore
Normal file
3
.prettierignore
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# Ignore artifacts:
|
||||||
|
build
|
||||||
|
coverage
|
||||||
4
.prettierrc
Normal file
4
.prettierrc
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"tabWidth": 4,
|
||||||
|
"useTabs": false
|
||||||
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
"$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:
|
||||||
image: git.rivercry.com/wg/monitor-im-flur:latest
|
build: .
|
||||||
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 { globalIgnores } from "eslint/config";
|
import globals from "globals";
|
||||||
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 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
@@ -1,14 +1,12 @@
|
|||||||
const token =
|
const token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJkMjQ1OTg0YjliYzE0OTNjYTdmZDJmNTA3ODgzN2U1YSIsImlhdCI6MTc1MzQwMjAzNiwiZXhwIjoyMDY4NzYyMDM2fQ.fnLSFKPdk8lkAEB-4ekdGUJ1PSCBxcAyasQF1PyrD3k";
|
||||||
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJkMjQ1OTg0YjliYzE0OTNjYTdmZDJmNTA3ODgzN2U1YSIsImlhdCI6MTc1MzQwMjAzNiwiZXhwIjoyMDY4NzYyMDM2fQ.fnLSFKPdk8lkAEB-4ekdGUJ1PSCBxcAyasQF1PyrD3k";
|
|
||||||
|
|
||||||
async function fetchTentHumidity() {
|
async function fetchTentHumidity() {
|
||||||
const url =
|
const url = "/api/states/sensor.third_reality_inc_3rths0224z_luftfeuchtigkeit_2";
|
||||||
"/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();
|
||||||
|
|
||||||
@@ -20,8 +18,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 { useEffect } from "react";
|
|
||||||
import { useFlatasticStore } from "@/store/flatastic";
|
import { useFlatasticStore } from "@/store/flatastic";
|
||||||
|
import { useEffect } from "react";
|
||||||
|
|
||||||
import type { FlatasticChore } from "@/types/flatasticChore";
|
import type { FlatasticChore } from "@/types/flatasticChore";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user