Skip to content

Commit

Permalink
Create deploy.yml (Github action for deployment to VPS)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinujaya-Sandaruwan committed Feb 20, 2024
1 parent a0ef1b1 commit 3279981
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
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 }}."

0 comments on commit 3279981

Please sign in to comment.