-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.19 KB
/
FrontendPipeline.yaml
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
37
38
39
40
41
42
43
44
45
name: Deploy Frontend
on:
push:
branches: [ "main" ]
paths:
- 'Frontend/openvidstreamer-fe/**'
pull_request:
branches: [ "main" ]
paths:
- 'Frontend/openvidstreamer-fe/**'
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18' # Adjust this to match your project's Node.js version
- name: Install dependencies
run: npm install
working-directory: ./Frontend/openvidstreamer-fe
- name: Install Vite globally
run: npm install -g vite
- name: Build project using Vite
run: vite build
working-directory: ./Frontend/openvidstreamer-fe
- name: Deploy over SSH
uses: appleboy/scp-action@master
with:
host: 145.220.74.148
username: ubuntu
password: ${{ secrets.DEPLSSH_PASSWORD }}
port: 22
source: "./Frontend/openvidstreamer-fe/dist/*"
target: "/var/www/fe"
rm: true # Removes all files in the target directory before copying