Skip to content

Merge pull request #7 from offiongbassey/develop #1

Merge pull request #7 from offiongbassey/develop

Merge pull request #7 from offiongbassey/develop #1

Workflow file for this run

name: Cpanel Deployment
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies
run: |
npm install
npm run build
- name: Upload to Cpanel
uses: appleboy/scp-action@v0.1.3
with:
host: ${{ secrets.CPANEL_HOST }}
username: ${{ secrets.CPANEL_USER }}
port: '22'
key: ${{ secrets.CPANEL_SSH_KEY }}
source: 'build/*'
target: '/home/ntplusne/public_html/offiongbassey.com.ng/'
- name: Restart server
run: |
ssh -i ${{ secrets.CPANEL_SSH_KEY }} -o StrictHostKeyChecking=no ${{ secrets.CPANEL_USER}}@${{secrets.CPANEL_HOST}} "restart command"