From 8e55cfae5f579db985fd31f6d762deebe8ee6689 Mon Sep 17 00:00:00 2001 From: nsavinda Date: Wed, 3 Jan 2024 07:12:38 +0530 Subject: [PATCH] git:add build workflow --- .github/workflows/frontend_build.yml | 39 ++++++++++++++++++++++++++++ 1 file changed, 39 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..8d87d82 --- /dev/null +++ b/.github/workflows/frontend_build.yml @@ -0,0 +1,39 @@ +name: Build React App + +on: + push: + branches: [ main ] + 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 + 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 }}