From 9d199c42e60336fb1273cd983342b1e0d7fded27 Mon Sep 17 00:00:00 2001 From: UdeeshaPrabhashana Date: Sun, 28 Jan 2024 13:57:17 +0530 Subject: [PATCH] add --- .github/workflows/frontend_build.yml | 42 ++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/frontend_build.yml diff --git a/.github/workflows/frontend_build.yml b/.github/workflows/frontend_build.yml new file mode 100644 index 0000000..38793bc --- /dev/null +++ b/.github/workflows/frontend_build.yml @@ -0,0 +1,42 @@ +name: Build React App + +on: + push: + branches: [ production ] + # pull_request: + # branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v1 + with: + node-version: '20' + + - name: Install pnpm + run: npm install -g pnpm + + - name: Install frontend dependencies with pnpm + + run: | + cd Frontend + pnpm install + + - name: Build frontend with pnpm + # env: + # REACT_APP_BACKEND_URL: https://whale-app-h5o2s.ondigitalocean.app + run: | + cd Frontend + pnpm run build + + - name: Deploy to GitHub Pages + uses: JamesIves/github-pages-deploy-action@4.1.4 + with: + branch: gh-pages + folder: Frontend/build + token: ${{ secrets.GITHUB_TOKEN }}