Compare commits
6 Commits
df2999516d
...
90d32e29f4
| Author | SHA1 | Date | |
|---|---|---|---|
| 90d32e29f4 | |||
| 1100be75c5 | |||
| 59001d5e97 | |||
| 46d9b8df94 | |||
| 7912f59fb8 | |||
| 90771b85e9 |
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
@@ -18,8 +18,8 @@ jobs:
|
|||||||
run: bun install
|
run: bun install
|
||||||
- name: Build
|
- name: Build
|
||||||
run: bun run build
|
run: bun run build
|
||||||
- name: Write git hash into dist
|
- name: Write Git-Hash into html
|
||||||
run: echo "export const GIT_HASH = '$(git rev-parse HEAD)';" > dist/git-hash.js
|
run: ./pipeline/create-git-hash-html.sh
|
||||||
- name: Create Build Artifact
|
- name: Create Build Artifact
|
||||||
uses: christopherhx/gitea-upload-artifact@v4
|
uses: christopherhx/gitea-upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
@@ -60,7 +60,6 @@ jobs:
|
|||||||
run: docker build -t git.rivercry.com/wg/monitor-im-flur .
|
run: docker build -t git.rivercry.com/wg/monitor-im-flur .
|
||||||
- name: Push Docker image
|
- name: Push Docker image
|
||||||
run: docker push git.rivercry.com/wg/monitor-im-flur
|
run: docker push git.rivercry.com/wg/monitor-im-flur
|
||||||
|
|
||||||
- name: Deploy via SSH
|
- name: Deploy via SSH
|
||||||
uses: appleboy/ssh-action@v0.1.10
|
uses: appleboy/ssh-action@v0.1.10
|
||||||
with:
|
with:
|
||||||
@@ -70,8 +69,6 @@ jobs:
|
|||||||
password: ${{ secrets.GARRISON_DOCKER_PASSWORD }}
|
password: ${{ secrets.GARRISON_DOCKER_PASSWORD }}
|
||||||
script: |
|
script: |
|
||||||
cd monitor-im-flur
|
cd monitor-im-flur
|
||||||
echo "Deploying Docker container..."
|
|
||||||
$HYPRLAND_INSTANCE_SIGNATURE
|
|
||||||
hyprctl dispatch exec 'pkill firefox'
|
hyprctl dispatch exec 'pkill firefox'
|
||||||
hyprctl dispatch exec 'firefox -kiosk localhost:9123'
|
hyprctl dispatch exec 'firefox -kiosk localhost:9123'
|
||||||
git clean -dfx
|
git clean -dfx
|
||||||
|
|||||||
@@ -1,11 +1,5 @@
|
|||||||
FROM oven/bun as builder
|
|
||||||
WORKDIR /app
|
|
||||||
COPY . .
|
|
||||||
RUN bun install
|
|
||||||
RUN bun run build
|
|
||||||
|
|
||||||
FROM nginx:alpine
|
FROM nginx:alpine
|
||||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
COPY ./dist /usr/share/nginx/html
|
||||||
COPY nginx.conf /etc/nginx/nginx.conf
|
COPY nginx.conf /etc/nginx/nginx.conf
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
CMD ["nginx", "-g", "daemon off;"]
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
12
githooks/pre-commit
Executable file
12
githooks/pre-commit
Executable file
@@ -0,0 +1,12 @@
|
|||||||
|
#!/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
|
||||||
@@ -16,7 +16,7 @@ http {
|
|||||||
index index.html;
|
index index.html;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ /index.html;
|
try_files $uri $uri/ /index.html /git-hash.js;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
11
pipeline/create-git-hash-html.sh
Executable file
11
pipeline/create-git-hash-html.sh
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/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
|
||||||
Reference in New Issue
Block a user