Skip to content

Commit a84d029

Browse files
authored
Create node.js.yml Github action
1 parent 6969d30 commit a84d029

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/node.js.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3+
4+
name: Node.js CI
5+
6+
on:
7+
push:
8+
branches: [ "develop" ]
9+
pull_request:
10+
branches: [ "develop" ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
node-version: [20.x]
20+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
21+
22+
steps:
23+
- uses: actions/checkout@v3
24+
- name: Glances will be build with Node.js ${{ matrix.node-version }}
25+
uses: actions/setup-node@v3
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
cache: 'npm'
29+
- name: Build Glances WebUI
30+
working-directory: ./glances/outputs/static
31+
run: |
32+
npm audit fix
33+
npm ci
34+
npm run build
35+
- name: Commit and push WebUI
36+
env:
37+
CI_COMMIT_MESSAGE: Continuous Integration Build Artifacts
38+
CI_COMMIT_AUTHOR: Continuous Integration
39+
run: |
40+
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
41+
git config --global user.email "[email protected]"
42+
git add glances/outputs/static
43+
git commit -m "${{ env.CI_COMMIT_MESSAGE }}"
44+
git push

0 commit comments

Comments
 (0)