Compare commits

..

1 Commits

Author SHA1 Message Date
djalim 5ed43f1072 🔧 ci: add Deno lint and format check workflow
Check Deno code / Check Deno code (pull_request) Failing after 5s
2026-01-08 17:31:45 +01:00
9 changed files with 32 additions and 35 deletions
-27
View File
@@ -1,27 +0,0 @@
name: "Build and push image"
on:
push:
branches:
- main
jobs:
deploy:
name: "Build Docker image"
runs-on: ubuntu-latest
steps:
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: registry.docker.polytech.djalim.fr
username: ${{ secrets.registry_login }}
password: ${{ secrets.registry_pass }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: registry.docker.polytech.djalim.fr/polympr:latest
+26
View File
@@ -0,0 +1,26 @@
name: "Check Deno code"
on:
pull_request:
branches:
- main
permissions:
contents: read
jobs:
check-code:
name: "Check Deno code"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Check formatting
run: deno fmt --check
- name: Check linting
run: deno lint
+2 -2
View File
@@ -3,11 +3,11 @@ FROM denoland/deno:alpine
WORKDIR /app
COPY . .
RUN deno cache main.ts --allow-import
RUN deno cache main.ts --allow-import flag
RUN deno task build
USER deno
EXPOSE 80
EXPOSE 443
CMD ["run", "-A", "main.ts"]
CMD ["run", "-A", "main.ts"]
-2
View File
@@ -1,2 +0,0 @@
#Local mode, set to true to access admin pages with any users
LOCAL=false
+1 -1
View File
@@ -2,7 +2,7 @@ import { defineConfig } from "$fresh/server.ts";
import ensureDatabases from "$root/databases/ensure.ts";
import { load } from "@std/dotenv";
await load({ envPath: "./.env", export: true });
await load({ envPath: "./.env.development.local", export: true });
await ensureDatabases();
export default defineConfig({
server: {
@@ -240,7 +240,7 @@ export default function EditMobility() {
</table>
</div>
))}
<button type="button" onClick={handleSave} disabled={isSaving}>
<button onClick={handleSave} disabled={isSaving}>
{isSaving ? "Saving..." : "Confirm"}
</button>
</section>
@@ -22,7 +22,7 @@ export default function Promotion(props: PromotionProps) {
<tbody>
{props.students
.filter((student) => student.promotionId === props.promo.id)
.map((student) => <Student key={student.id} student={student} />)}
.map((student) => <Student student={student} />)}
</tbody>
</table>
</div>
@@ -104,7 +104,7 @@ export default function UploadStudents() {
return (
<>
<input type="file" accept=".xlsx, .xls" onChange={handleFileChange} />
<button type="button" onClick={confirmUpload}>Confirm Upload</button>
<button onClick={confirmUpload}>Confirm Upload</button>
<p>{statusMessage.value}</p>
</>
);