-
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (33 loc) · 983 Bytes
/
deploy.yml
File metadata and controls
36 lines (33 loc) · 983 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# This workflow will do a clean install of node dependencies,
# build the application and deploy it to production
# when a new version (git tag) is released
name: Build & Deploy (Production)
on:
push:
tags:
- '*'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
- name: Build app via NPM
run: |
npm install
npm run build
- name: Push Build files to production environment
uses: burnett01/rsync-deployments@7.0.2
with:
switches: -avzr --delete
path: dist/
remote_path: ${{ secrets.DEPLOY_PATH }}
remote_host: ${{ secrets.DEPLOY_HOST }}
remote_port: ${{ secrets.DEPLOY_PORT }}
remote_user: ${{ secrets.DEPLOY_USER }}
remote_key: ${{ secrets.DEPLOY_SSH_KEY }}
remote_key_pass: ${{ secrets.DEPLOY_SSH_PHRASE }}