-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (31 loc) · 882 Bytes
/
build.yml
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
name: Build and Publish
on:
workflow_dispatch:
push:
branches:
- main
jobs:
build:
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/[email protected]
- name: Install dependencies
uses: bahmutov/[email protected]
with:
working-directory: ./frontend
- name: Build Frontend
working-directory: ./frontend
run: npm run build
- name: Copy frontend files to webserver folder
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
port: ${{ secrets.PORT }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
source: frontend/build/*
target: "/var/www/${{ secrets.DOMAIN }}"
strip_components: 1