Skip to content

Create deploy.yml (Github action for deployment to VPS) #1

Create deploy.yml (Github action for deployment to VPS)

Create deploy.yml (Github action for deployment to VPS) #1

Workflow file for this run

name: Deployment
on:
push:
branches:
- master
workflow_dispatch:
jobs:
Deploy:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- run: npm i
- run: npm run build --if-present
env:
CI: false
- name: Copy folder content recursively to VPS
uses: garygrossgarten/github-action-scp@release
with:
local: dist
remote: /home/dinujaya/web/dinujaya.me/public_html
host: ${{ secrets.VPS_HOST }}
username: ${{ secrets.VPS_USERNAME }}
password: ${{ secrets.VPS_PASSWORD }}
- run: echo "Deployment status is ${{ job.status }}."