From 630ab31c75af62a7eabe57235ccf6cafc0b4329e Mon Sep 17 00:00:00 2001 From: Charan Date: Wed, 25 Oct 2023 00:42:07 +0530 Subject: [PATCH] Create main.yml Setup build and deploy action for main. --- .github/workflows/main.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..0832d2f --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,34 @@ +name: Build and deploy + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: 18 + - name: Install dependencies + run: npm install + - name: Build the app + run: npm run build + + deploy: + needs: build + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Deploy to GitHub Pages + uses: JamesIves/github-pages-deploy-action@4.4.3 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: gh-pages + FOLDER: build