From b1a2ce2ba6b3a28cd5c5a1099cc335dcdb2c7d96 Mon Sep 17 00:00:00 2001 From: Rike Date: Mon, 15 Apr 2024 15:26:12 +0200 Subject: [PATCH] wip --- .github/workflows/build.yml | 4 +- .github/workflows/release.yml | 108 +++++++++++++++++----------------- 2 files changed, 56 insertions(+), 56 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 49af030..75e9357 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,8 +18,8 @@ jobs: - uses: actions/checkout@v4 # Setup Node - - name: Use Node.js ${{ matrix.node-version }} for frontend - uses: actions/setup-node@v4 + - name: Use Node.js ${{ matrix.node-version }} for frontend + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0653c6b..f30b793 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,65 +16,65 @@ jobs: steps: # Checkout project - - uses: actions/checkout@v4 + - uses: actions/checkout@v4 - # Setup Node - - name: Use Node.js ${{ matrix.node-version }} for frontend - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} + # Setup Node + - name: Use Node.js ${{ matrix.node-version }} for frontend + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} # FRONTEND # # Install Packages - name: Install Dependencies for Frontend - run: npm ci - working-directory: frontend - - # Include whenver tests are added - # - name: npm run test for frontend - # run: npm run test --if-present - # working-directory: frontend - - - name: npm run build for frontend - run: npm run build - working-directory: frontend - - # working-directory: frontend - # with: - # node-version: '18.x' - # app_location: "/frontend" - # output_location: "build" - - # Copy build directory to backend - - name: Copy frontend build to backend - run: cp -R ./frontend/build/* ./backend/__BUILD/ - - # BACKEND # - # Install Packages - - name: Install Dependencies for Backend - run: | - npm ci - working-directory: ./backend - - # Run Jest tests - - name: Run Tests - working-directory: ./backend - run: npm run test --if-present - - # Compile TS - - name: Compile TS - working-directory: ./backend - run: npm run compile - - - name: Zip artifact for deployment - run: zip release.zip ./* -r - working-directory: ./backend - - - name: Upload artifact for deployment job - uses: actions/upload-artifact@v3 - with: - name: node-app - path: backend/release.zip + run: npm ci + working-directory: frontend + + # Include whenver tests are added + # - name: npm run test for frontend + # run: npm run test --if-present + # working-directory: frontend + + - name: npm run build for frontend + run: npm run build + working-directory: frontend + + # working-directory: frontend + # with: + # node-version: '18.x' + # app_location: "/frontend" + # output_location: "build" + + # Copy build directory to backend + - name: Copy frontend build to backend + run: cp -R ./frontend/build/* ./backend/__BUILD/ + + # BACKEND # + # Install Packages + - name: Install Dependencies for Backend + run: | + npm ci + working-directory: ./backend + + # Run Jest tests + - name: Run Tests + working-directory: ./backend + run: npm run test --if-present + + # Compile TS + - name: Compile TS + working-directory: ./backend + run: npm run compile + + - name: Zip artifact for deployment + run: zip release.zip ./* -r + working-directory: ./backend + + - name: Upload artifact for deployment job + uses: actions/upload-artifact@v3 + with: + name: node-app + path: backend/release.zip deploy: runs-on: ubuntu-latest