From cdde6119b8cae9b12a94749b0556b162f0c12bd9 Mon Sep 17 00:00:00 2001 From: Carlltz Date: Sun, 29 Dec 2024 18:49:14 +0100 Subject: [PATCH 1/4] Revert "Revert "Move to frontend dir"" This reverts commit 49cd9c1fafdf40a232dc6b1c0ce600ac33a49162. --- .gitignore | 2 +- .eslintrc.json => frontend/.eslintrc.json | 0 .nvmrc => frontend/.nvmrc | 0 Dockerfile => frontend/Dockerfile | 0 next.config.mjs => frontend/next.config.mjs | 0 package-lock.json => frontend/package-lock.json | 0 package.json => frontend/package.json | 0 {src => frontend/src}/app/(main)/about/data.ts | 0 {src => frontend/src}/app/(main)/about/helpers.ts | 0 .../src}/app/(main)/about/page.module.css | 0 {src => frontend/src}/app/(main)/about/page.tsx | 0 {src => frontend/src}/app/(main)/about/types.ts | 0 {src => frontend/src}/app/(main)/layout.tsx | 0 {src => frontend/src}/app/(main)/meta/page.tsx | 0 {src => frontend/src}/app/(main)/page.module.css | 0 {src => frontend/src}/app/(main)/page.tsx | 0 {src => frontend/src}/app/(main)/schedule/page.tsx | 0 .../src}/app/(main)/stadrutiner/page.tsx | 0 .../src}/app/clicker/components/Cookie.module.css | 0 .../src}/app/clicker/components/Cookie.tsx | 0 .../src}/app/clicker/components/utils.ts | 0 {src => frontend/src}/app/clicker/helpers.ts | 0 {src => frontend/src}/app/clicker/layout.tsx | 0 {src => frontend/src}/app/clicker/page.module.css | 0 {src => frontend/src}/app/clicker/page.tsx | 0 {src => frontend/src}/app/clicker/server.ts | 0 {src => frontend/src}/app/favicon.ico | Bin {src => frontend/src}/app/globals.css | 0 {src => frontend/src}/app/laskkyl/Gif.tsx | 0 {src => frontend/src}/app/laskkyl/page.module.css | 0 {src => frontend/src}/app/laskkyl/page.tsx | 0 {src => frontend/src}/app/laskkyl/server.ts | 0 {src => frontend/src}/app/laskkyl/types.ts | 0 {src => frontend/src}/app/layout.tsx | 0 {src => frontend/src}/app/utils/functions.ts | 0 .../src}/components/ClickPopup.module.css | 0 {src => frontend/src}/components/ClickPopup.tsx | 0 .../src}/components/FloorPlan.module.css | 0 {src => frontend/src}/components/FloorPlan.tsx | 0 {src => frontend/src}/components/Header.module.css | 0 {src => frontend/src}/components/Header.tsx | 0 {src => frontend/src}/components/Info.module.css | 0 {src => frontend/src}/components/Info.tsx | 0 {src => frontend/src}/components/NavBar.module.css | 0 {src => frontend/src}/components/NavBar.tsx | 0 {src => frontend/src}/components/Profile.module.css | 0 {src => frontend/src}/components/Profile.tsx | 0 {src => frontend/src}/components/ProfileAgg.tsx | 0 .../src}/components/ScrollTop.module.css | 0 {src => frontend/src}/components/ScrollTop.tsx | 0 tsconfig.json => frontend/tsconfig.json | 0 51 files changed, 1 insertion(+), 1 deletion(-) rename .eslintrc.json => frontend/.eslintrc.json (100%) rename .nvmrc => frontend/.nvmrc (100%) rename Dockerfile => frontend/Dockerfile (100%) rename next.config.mjs => frontend/next.config.mjs (100%) rename package-lock.json => frontend/package-lock.json (100%) rename package.json => frontend/package.json (100%) rename {src => frontend/src}/app/(main)/about/data.ts (100%) rename {src => frontend/src}/app/(main)/about/helpers.ts (100%) rename {src => frontend/src}/app/(main)/about/page.module.css (100%) rename {src => frontend/src}/app/(main)/about/page.tsx (100%) rename {src => frontend/src}/app/(main)/about/types.ts (100%) rename {src => frontend/src}/app/(main)/layout.tsx (100%) rename {src => frontend/src}/app/(main)/meta/page.tsx (100%) rename {src => frontend/src}/app/(main)/page.module.css (100%) rename {src => frontend/src}/app/(main)/page.tsx (100%) rename {src => frontend/src}/app/(main)/schedule/page.tsx (100%) rename {src => frontend/src}/app/(main)/stadrutiner/page.tsx (100%) rename {src => frontend/src}/app/clicker/components/Cookie.module.css (100%) rename {src => frontend/src}/app/clicker/components/Cookie.tsx (100%) rename {src => frontend/src}/app/clicker/components/utils.ts (100%) rename {src => frontend/src}/app/clicker/helpers.ts (100%) rename {src => frontend/src}/app/clicker/layout.tsx (100%) rename {src => frontend/src}/app/clicker/page.module.css (100%) rename {src => frontend/src}/app/clicker/page.tsx (100%) rename {src => frontend/src}/app/clicker/server.ts (100%) rename {src => frontend/src}/app/favicon.ico (100%) rename {src => frontend/src}/app/globals.css (100%) rename {src => frontend/src}/app/laskkyl/Gif.tsx (100%) rename {src => frontend/src}/app/laskkyl/page.module.css (100%) rename {src => frontend/src}/app/laskkyl/page.tsx (100%) rename {src => frontend/src}/app/laskkyl/server.ts (100%) rename {src => frontend/src}/app/laskkyl/types.ts (100%) rename {src => frontend/src}/app/layout.tsx (100%) rename {src => frontend/src}/app/utils/functions.ts (100%) rename {src => frontend/src}/components/ClickPopup.module.css (100%) rename {src => frontend/src}/components/ClickPopup.tsx (100%) rename {src => frontend/src}/components/FloorPlan.module.css (100%) rename {src => frontend/src}/components/FloorPlan.tsx (100%) rename {src => frontend/src}/components/Header.module.css (100%) rename {src => frontend/src}/components/Header.tsx (100%) rename {src => frontend/src}/components/Info.module.css (100%) rename {src => frontend/src}/components/Info.tsx (100%) rename {src => frontend/src}/components/NavBar.module.css (100%) rename {src => frontend/src}/components/NavBar.tsx (100%) rename {src => frontend/src}/components/Profile.module.css (100%) rename {src => frontend/src}/components/Profile.tsx (100%) rename {src => frontend/src}/components/ProfileAgg.tsx (100%) rename {src => frontend/src}/components/ScrollTop.module.css (100%) rename {src => frontend/src}/components/ScrollTop.tsx (100%) rename tsconfig.json => frontend/tsconfig.json (100%) diff --git a/.gitignore b/.gitignore index f886745..87870bf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. # dependencies -/node_modules +node_modules /.pnp .pnp.js .yarn/install-state.gz diff --git a/.eslintrc.json b/frontend/.eslintrc.json similarity index 100% rename from .eslintrc.json rename to frontend/.eslintrc.json diff --git a/.nvmrc b/frontend/.nvmrc similarity index 100% rename from .nvmrc rename to frontend/.nvmrc diff --git a/Dockerfile b/frontend/Dockerfile similarity index 100% rename from Dockerfile rename to frontend/Dockerfile diff --git a/next.config.mjs b/frontend/next.config.mjs similarity index 100% rename from next.config.mjs rename to frontend/next.config.mjs diff --git a/package-lock.json b/frontend/package-lock.json similarity index 100% rename from package-lock.json rename to frontend/package-lock.json diff --git a/package.json b/frontend/package.json similarity index 100% rename from package.json rename to frontend/package.json diff --git a/src/app/(main)/about/data.ts b/frontend/src/app/(main)/about/data.ts similarity index 100% rename from src/app/(main)/about/data.ts rename to frontend/src/app/(main)/about/data.ts diff --git a/src/app/(main)/about/helpers.ts b/frontend/src/app/(main)/about/helpers.ts similarity index 100% rename from src/app/(main)/about/helpers.ts rename to frontend/src/app/(main)/about/helpers.ts diff --git a/src/app/(main)/about/page.module.css b/frontend/src/app/(main)/about/page.module.css similarity index 100% rename from src/app/(main)/about/page.module.css rename to frontend/src/app/(main)/about/page.module.css diff --git a/src/app/(main)/about/page.tsx b/frontend/src/app/(main)/about/page.tsx similarity index 100% rename from src/app/(main)/about/page.tsx rename to frontend/src/app/(main)/about/page.tsx diff --git a/src/app/(main)/about/types.ts b/frontend/src/app/(main)/about/types.ts similarity index 100% rename from src/app/(main)/about/types.ts rename to frontend/src/app/(main)/about/types.ts diff --git a/src/app/(main)/layout.tsx b/frontend/src/app/(main)/layout.tsx similarity index 100% rename from src/app/(main)/layout.tsx rename to frontend/src/app/(main)/layout.tsx diff --git a/src/app/(main)/meta/page.tsx b/frontend/src/app/(main)/meta/page.tsx similarity index 100% rename from src/app/(main)/meta/page.tsx rename to frontend/src/app/(main)/meta/page.tsx diff --git a/src/app/(main)/page.module.css b/frontend/src/app/(main)/page.module.css similarity index 100% rename from src/app/(main)/page.module.css rename to frontend/src/app/(main)/page.module.css diff --git a/src/app/(main)/page.tsx b/frontend/src/app/(main)/page.tsx similarity index 100% rename from src/app/(main)/page.tsx rename to frontend/src/app/(main)/page.tsx diff --git a/src/app/(main)/schedule/page.tsx b/frontend/src/app/(main)/schedule/page.tsx similarity index 100% rename from src/app/(main)/schedule/page.tsx rename to frontend/src/app/(main)/schedule/page.tsx diff --git a/src/app/(main)/stadrutiner/page.tsx b/frontend/src/app/(main)/stadrutiner/page.tsx similarity index 100% rename from src/app/(main)/stadrutiner/page.tsx rename to frontend/src/app/(main)/stadrutiner/page.tsx diff --git a/src/app/clicker/components/Cookie.module.css b/frontend/src/app/clicker/components/Cookie.module.css similarity index 100% rename from src/app/clicker/components/Cookie.module.css rename to frontend/src/app/clicker/components/Cookie.module.css diff --git a/src/app/clicker/components/Cookie.tsx b/frontend/src/app/clicker/components/Cookie.tsx similarity index 100% rename from src/app/clicker/components/Cookie.tsx rename to frontend/src/app/clicker/components/Cookie.tsx diff --git a/src/app/clicker/components/utils.ts b/frontend/src/app/clicker/components/utils.ts similarity index 100% rename from src/app/clicker/components/utils.ts rename to frontend/src/app/clicker/components/utils.ts diff --git a/src/app/clicker/helpers.ts b/frontend/src/app/clicker/helpers.ts similarity index 100% rename from src/app/clicker/helpers.ts rename to frontend/src/app/clicker/helpers.ts diff --git a/src/app/clicker/layout.tsx b/frontend/src/app/clicker/layout.tsx similarity index 100% rename from src/app/clicker/layout.tsx rename to frontend/src/app/clicker/layout.tsx diff --git a/src/app/clicker/page.module.css b/frontend/src/app/clicker/page.module.css similarity index 100% rename from src/app/clicker/page.module.css rename to frontend/src/app/clicker/page.module.css diff --git a/src/app/clicker/page.tsx b/frontend/src/app/clicker/page.tsx similarity index 100% rename from src/app/clicker/page.tsx rename to frontend/src/app/clicker/page.tsx diff --git a/src/app/clicker/server.ts b/frontend/src/app/clicker/server.ts similarity index 100% rename from src/app/clicker/server.ts rename to frontend/src/app/clicker/server.ts diff --git a/src/app/favicon.ico b/frontend/src/app/favicon.ico similarity index 100% rename from src/app/favicon.ico rename to frontend/src/app/favicon.ico diff --git a/src/app/globals.css b/frontend/src/app/globals.css similarity index 100% rename from src/app/globals.css rename to frontend/src/app/globals.css diff --git a/src/app/laskkyl/Gif.tsx b/frontend/src/app/laskkyl/Gif.tsx similarity index 100% rename from src/app/laskkyl/Gif.tsx rename to frontend/src/app/laskkyl/Gif.tsx diff --git a/src/app/laskkyl/page.module.css b/frontend/src/app/laskkyl/page.module.css similarity index 100% rename from src/app/laskkyl/page.module.css rename to frontend/src/app/laskkyl/page.module.css diff --git a/src/app/laskkyl/page.tsx b/frontend/src/app/laskkyl/page.tsx similarity index 100% rename from src/app/laskkyl/page.tsx rename to frontend/src/app/laskkyl/page.tsx diff --git a/src/app/laskkyl/server.ts b/frontend/src/app/laskkyl/server.ts similarity index 100% rename from src/app/laskkyl/server.ts rename to frontend/src/app/laskkyl/server.ts diff --git a/src/app/laskkyl/types.ts b/frontend/src/app/laskkyl/types.ts similarity index 100% rename from src/app/laskkyl/types.ts rename to frontend/src/app/laskkyl/types.ts diff --git a/src/app/layout.tsx b/frontend/src/app/layout.tsx similarity index 100% rename from src/app/layout.tsx rename to frontend/src/app/layout.tsx diff --git a/src/app/utils/functions.ts b/frontend/src/app/utils/functions.ts similarity index 100% rename from src/app/utils/functions.ts rename to frontend/src/app/utils/functions.ts diff --git a/src/components/ClickPopup.module.css b/frontend/src/components/ClickPopup.module.css similarity index 100% rename from src/components/ClickPopup.module.css rename to frontend/src/components/ClickPopup.module.css diff --git a/src/components/ClickPopup.tsx b/frontend/src/components/ClickPopup.tsx similarity index 100% rename from src/components/ClickPopup.tsx rename to frontend/src/components/ClickPopup.tsx diff --git a/src/components/FloorPlan.module.css b/frontend/src/components/FloorPlan.module.css similarity index 100% rename from src/components/FloorPlan.module.css rename to frontend/src/components/FloorPlan.module.css diff --git a/src/components/FloorPlan.tsx b/frontend/src/components/FloorPlan.tsx similarity index 100% rename from src/components/FloorPlan.tsx rename to frontend/src/components/FloorPlan.tsx diff --git a/src/components/Header.module.css b/frontend/src/components/Header.module.css similarity index 100% rename from src/components/Header.module.css rename to frontend/src/components/Header.module.css diff --git a/src/components/Header.tsx b/frontend/src/components/Header.tsx similarity index 100% rename from src/components/Header.tsx rename to frontend/src/components/Header.tsx diff --git a/src/components/Info.module.css b/frontend/src/components/Info.module.css similarity index 100% rename from src/components/Info.module.css rename to frontend/src/components/Info.module.css diff --git a/src/components/Info.tsx b/frontend/src/components/Info.tsx similarity index 100% rename from src/components/Info.tsx rename to frontend/src/components/Info.tsx diff --git a/src/components/NavBar.module.css b/frontend/src/components/NavBar.module.css similarity index 100% rename from src/components/NavBar.module.css rename to frontend/src/components/NavBar.module.css diff --git a/src/components/NavBar.tsx b/frontend/src/components/NavBar.tsx similarity index 100% rename from src/components/NavBar.tsx rename to frontend/src/components/NavBar.tsx diff --git a/src/components/Profile.module.css b/frontend/src/components/Profile.module.css similarity index 100% rename from src/components/Profile.module.css rename to frontend/src/components/Profile.module.css diff --git a/src/components/Profile.tsx b/frontend/src/components/Profile.tsx similarity index 100% rename from src/components/Profile.tsx rename to frontend/src/components/Profile.tsx diff --git a/src/components/ProfileAgg.tsx b/frontend/src/components/ProfileAgg.tsx similarity index 100% rename from src/components/ProfileAgg.tsx rename to frontend/src/components/ProfileAgg.tsx diff --git a/src/components/ScrollTop.module.css b/frontend/src/components/ScrollTop.module.css similarity index 100% rename from src/components/ScrollTop.module.css rename to frontend/src/components/ScrollTop.module.css diff --git a/src/components/ScrollTop.tsx b/frontend/src/components/ScrollTop.tsx similarity index 100% rename from src/components/ScrollTop.tsx rename to frontend/src/components/ScrollTop.tsx diff --git a/tsconfig.json b/frontend/tsconfig.json similarity index 100% rename from tsconfig.json rename to frontend/tsconfig.json From 62235802362df4607afe6cd1766bc209a8773a1b Mon Sep 17 00:00:00 2001 From: Carlltz Date: Sun, 29 Dec 2024 18:50:34 +0100 Subject: [PATCH 2/4] Maybe fix actions --- .github/workflows/commit.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/commit.yml b/.github/workflows/commit.yml index 4a4d8b9..c43f6dd 100644 --- a/.github/workflows/commit.yml +++ b/.github/workflows/commit.yml @@ -7,6 +7,9 @@ jobs: lint: name: Lint runs-on: ubuntu-latest + defaults: + run: + working-directory: ./frontend steps: - name: Git checkout uses: actions/checkout@v3 From cbff45c7292336a808da28024c8b1c4e26acf4b5 Mon Sep 17 00:00:00 2001 From: Carlltz Date: Sun, 29 Dec 2024 18:54:13 +0100 Subject: [PATCH 3/4] Action fippel --- .github/workflows/commit.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/commit.yml b/.github/workflows/commit.yml index c43f6dd..84a42a1 100644 --- a/.github/workflows/commit.yml +++ b/.github/workflows/commit.yml @@ -18,6 +18,7 @@ jobs: - uses: actions/setup-node@v4 with: + cache-dependency-path: ./frontend/package-lock.json node-version: 22.5 cache: 'npm' From 8ed293f028c85f95d6526488c8f48606a1706bfc Mon Sep 17 00:00:00 2001 From: Carlltz Date: Sun, 4 May 2025 18:06:31 +0200 Subject: [PATCH 4/4] Save old code, for nomad --- .github/workflows/deploy.yml | 99 ++++++++++++++++++++++-------------- frontend/Dockerfile | 2 +- job.nomad.hcl | 46 +++++++++++++++++ 3 files changed, 109 insertions(+), 38 deletions(-) create mode 100644 job.nomad.hcl diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4ce939d..26d7ad9 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,42 +1,67 @@ name: Deploy on: - push: - branches: [ main ] - workflow_dispatch: + push: + branches: [main] + workflow_dispatch: + +env: + NOMAD_VERSION: 1.7.7 jobs: - wait: - name: Wait for tests - runs-on: ubuntu-latest - steps: - - name: Wait for tests - uses: lewagon/wait-on-check-action@v1.3.4 - with: - ref: ${{ github.ref }} - check-name: Lint - repo-token: ${{ secrets.GITHUB_TOKEN }} - wait-interval: 10 - - deploy: - runs-on: ubuntu-latest - needs: - - wait - - steps: - - name: Git checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - # See the following link for documentation: - # https://github.com/marketplace/actions/dokku - - name: Push to medusa - uses: dokku/github-action@v1.4.0 - with: - ssh_private_key: ${{ secrets.MEDUSA_GLOBAL_DEPLOY_KEY }} - git_remote_url: ssh://dokku@medusa.datasektionen.se/bea - # force might feel risky, but there is no good reason why the server - # should ever not be a mirror of the deploy branch. And the errors we - # could get otherwise would probably be nasty to deal with - git_push_flags: --force + wait: + name: Wait for tests + runs-on: ubuntu-latest + steps: + - name: Wait for tests + uses: lewagon/wait-on-check-action@v1.3.4 + with: + ref: ${{ github.ref }} + check-name: Lint + repo-token: ${{ secrets.GITHUB_TOKEN }} + wait-interval: 10 + deploy: + runs-on: ubuntu-latest + needs: + - wait + + steps: + - name: Git checkout + uses: actions/checkout@v4 + + - name: Set environment variables + run: | + cat >> "$GITHUB_ENV" <