Skip to content

workflow: working out on deploy automation #3

workflow: working out on deploy automation

workflow: working out on deploy automation #3

Workflow file for this run

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: Configure git
run: |
git config user.email "im.shubhamlal@gmail.com"
git config user.name "Shubham Lal"
- name: Commit and push
env:
GH_CPANEL: ${{ secrets.GH_CPANEL }}
run: |
git add .
git commit -m "Build for deployment"
git push https://${GH_CPANEL}@github.com/Shubham-Lal/GitHub-Clone.git HEAD:main