Skip to content

Instantly share code, notes, and snippets.

@kirwako
Last active July 20, 2022 13:22
Show Gist options
  • Save kirwako/3e81a11e84d67813b27048a9529b1f65 to your computer and use it in GitHub Desktop.
Save kirwako/3e81a11e84d67813b27048a9529b1f65 to your computer and use it in GitHub Desktop.
yaml configuration file for deploying frontend app in cPanel using GitHub actions
on:
push:
branches:
- master
name: ๐Ÿš€ Deploy Website to CPanel
jobs:
web-deploy:
name: ๐ŸŽ‰ Deploy Website to CPanel
runs-on: ubuntu-latest
steps:
- name: ๐Ÿšš Get latest code
uses: actions/checkout@v2
- name: Use Node.js 14
uses: actions/setup-node@v2
with:
node-version: '14'
- name: ๐Ÿ”จ Build Project
run: |
npm install
npm run build
- name: List output files
run: find build/ -print
- name: ๐Ÿ“‚ Sync files
uses: SamKirkland/FTP-Deploy-Action@4.1.0
with:
server: ${{ secrets.FTP_SERVER }}
username: ${{ secrets.FTP_USERNAME }}
password: ${{ secrets.FTP_PASSWORD }}
local-dir: build/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment