forked from ahdis/matchbox
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (42 loc) · 1.27 KB
/
angular_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
39
40
41
42
43
44
45
46
47
48
49
50
name: Build the Angular GUI and commit
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "matchbox-frontend/**"
jobs:
build-and-commit:
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
defaults:
run:
working-directory: ./matchbox-frontend
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
# https://github.com/actions/setup-node
node-version: 18
cache: npm
cache-dependency-path: matchbox-frontend/package-lock.json
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Remove the old GUI
run: rm -rf ../matchbox-server/src/main/resources/static
- name: Move the new GUI
run: mv dist ../matchbox-server/src/main/resources/static
- name: Commit
if: success()
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "server: rebuild the Angular GUI resources"
file_pattern: "matchbox-server/src/main/resources/static"