Skip to content

Create main.yml

Create main.yml #1

Workflow file for this run

name: Cpanel deploy app
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
name: Build and Push
steps:
- name: git-checkout
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: "20"
- name: Install pnpm
run: npm install -g pnpm
- name: Install all dependencies
run: pnpm install
- name: Build artifacts
run: pnpm run build
- name: Upload to cpanel
uses: SamKirkland/[email protected]
with:
server: ${{ secrets.FTP_SERVER }}
username: ${{ secrets.FTP_USERNAME }}
password: ${{ secrets.FTP_PASSWORD }}
local-dir: ./dist/