Skip to content

Commit

Permalink
build automation yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Shubham-Lal committed Dec 20, 2023
1 parent 6f6d862 commit adc33ab
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .cpanel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
deployment:
tasks:
- export DEPLOYPATH=/home3/shubhaml/github.shubhamlal.in
- /bin/cp -R client/dist/* $DEPLOYPATH
29 changes: 29 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build and Deploy to cPanel
on:
push:
branches:
- main

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 20.8.1

- name: Install dependencies and build
run: |
cd client
npm install
npm run build
- name: Deploy to cPanel
run: |
git add .
git commit -m "Build for deployment"
git push

0 comments on commit adc33ab

Please sign in to comment.