-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create deploy.yml (Github action for deployment to VPS)
- Loading branch information
1 parent
a0ef1b1
commit 3279981
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }}." |