From 5c72a5c9460004dc5371f155f4b9462daee5dbcd Mon Sep 17 00:00:00 2001 From: sethupavan12 Date: Thu, 25 Jul 2024 02:03:40 +0100 Subject: [PATCH] trying to deploy front --- .github/workflows/frontend-deploy.yml | 33 +++++++++++++++------------ turing-arena-frontend/package.json | 6 ++--- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/.github/workflows/frontend-deploy.yml b/.github/workflows/frontend-deploy.yml index b0f2492c..f43c78c5 100644 --- a/.github/workflows/frontend-deploy.yml +++ b/.github/workflows/frontend-deploy.yml @@ -1,4 +1,4 @@ -name: Deploy Frontend +name: Deploy React App on: push: @@ -10,21 +10,24 @@ jobs: runs-on: ubuntu-latest steps: - - name: Checkout code - uses: actions/checkout@v2 + - name: Checkout code + uses: actions/checkout@v2 - - name: Set up Node.js - uses: actions/setup-node@v2 - with: - node-version: '14' + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '14' - - name: Install dependencies - run: npm install + - name: Install dependencies + run: npm install + working-directory: ./turing-arena-frontend - - name: Build - run: npm run build + - name: Build the project + run: npm run build + working-directory: ./turing-arena-frontend - - name: Deploy to GitHub Pages - run: npm run deploy - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Deploy to GitHub Pages + run: npm run deploy + working-directory: ./turing-arena-frontend + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/turing-arena-frontend/package.json b/turing-arena-frontend/package.json index 594855d5..e24d2a2d 100644 --- a/turing-arena-frontend/package.json +++ b/turing-arena-frontend/package.json @@ -23,12 +23,12 @@ "gh-pages": "^3.2.3" }, "scripts": { + "predeploy": "npm run build", + "deploy": "gh-pages -d build", "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", - "eject": "react-scripts eject", - "predeploy": "npm run build", - "deploy": "gh-pages -d build" + "eject": "react-scripts eject" }, "eslintConfig": { "extends": [