-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (42 loc) · 1.23 KB
/
angular.yml
File metadata and controls
49 lines (42 loc) · 1.23 KB
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
46
47
48
49
name: Deploy angular
on:
push:
paths:
- 'frontend/**'
branches:
- main
jobs:
build:
# using Ubuntu
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./frontend
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3 #this installs node and npm for us
with:
node-version: "16.x"
- uses: actions/cache@v3 # this allows for re-using node_modules caching, making builds a bit faster.
with:
path: ~/.npm
key: ${{ runner.os }}-nodejs-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm cache clean --force
- run: npm install
- run: npm install -g @angular/cli > /dev/null
- run: npm link webpack-sources
- run: ng build
- name: copy file via ssh key
uses: appleboy/scp-action@v0.1.4
with:
source: frontend/dist/ui/*
target: /srv/http/stats.matrixnetwork.org/
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
port: ${{ secrets.PORT }}
password: ${{ secrets.PASSWORD }}
debug: true
strip_components: 3
overwrite: true