From e6bbc19286a0d8b9aec656d0363b5e945e977479 Mon Sep 17 00:00:00 2001 From: Evan Hughes Date: Sun, 27 Mar 2022 14:05:11 +1000 Subject: [PATCH] Splitting up the SPA and backend from each other --- .github/workflows/app.yml | 3 +- .github/workflows/backend.yml | 35 + .github/workflows/frontend.yml | 31 + backend/resources/views/welcome.blade.php | 7095 +-------------------- 4 files changed, 70 insertions(+), 7094 deletions(-) create mode 100644 .github/workflows/backend.yml create mode 100644 .github/workflows/frontend.yml diff --git a/.github/workflows/app.yml b/.github/workflows/app.yml index ce4b193..43638d4 100644 --- a/.github/workflows/app.yml +++ b/.github/workflows/app.yml @@ -1,4 +1,4 @@ -name: Build Todo App +name: Build Todo App ( Combined Frontend + Backend ) on: push: @@ -43,4 +43,5 @@ jobs: push: true tags: | ghcr.io/csse6400/todo-app:latest + \ No newline at end of file diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml new file mode 100644 index 0000000..8a7fa56 --- /dev/null +++ b/.github/workflows/backend.yml @@ -0,0 +1,35 @@ +name: Build Todo App ( Backend ) + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Log in to the Container registry + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push Docker image + uses: docker/build-push-action@v2 + with: + context: ./backend + file: backend/Dockerfile + push: true + tags: | + ghcr.io/csse6400/todo-app:backend-latest + + \ No newline at end of file diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml new file mode 100644 index 0000000..2369f19 --- /dev/null +++ b/.github/workflows/frontend.yml @@ -0,0 +1,31 @@ +name: Build Todo App ( Frontend ) + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + + - name: Checkout + uses: actions/checkout@v2 + + - name: Frontend Dependencies + uses: jorelali/setup-elm@v3 + with: + elm-version: 0.19.1 + + - name: Compile Frontend + working-directory: ./frontend + run: elm make src/Main.elm + + - name: Release Frontend + uses: softprops/action-gh-release@v1 + with: + files: | + ./frontend/index.html + + \ No newline at end of file diff --git a/backend/resources/views/welcome.blade.php b/backend/resources/views/welcome.blade.php index af26ab8..96df486 100644 --- a/backend/resources/views/welcome.blade.php +++ b/backend/resources/views/welcome.blade.php @@ -2,7101 +2,10 @@ - Main + Todo App - - -

-
-
-
+    Hey!, if you see this page then the ALB probably isnt working :(