-
Notifications
You must be signed in to change notification settings - Fork 7
56 lines (44 loc) · 1.35 KB
/
build-statics.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
46
47
48
49
50
51
52
53
54
55
56
name: Node.js - Build & Auto-Commit to CLI data/report/**
on:
pull_request:
types:
- closed
# Trigger when PR is closed
paths:
- "js/**"
# Trigger when diffs detected in js sources
branches:
- main
- release/**
# Only PR target are `main` or `release/**` branches
jobs:
if_merged_build:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the changed files back to the repository.
contents: write
defaults:
run:
working-directory: ./js
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: 20
- uses: pnpm/action-setup@v4
with:
version: 8
- name: Install dependencies
working-directory: ./js
run: pnpm install --frozen-lockfile
- name: Build Apps
run: pnpm run build
- name: Pull Remote Changes (before AC)
run: git pull origin ${{ github.base_ref }}
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: AUTO-COMMIT - build js statics to recce data/
branch: ${{ github.base_ref }}
# Auto-commits to target merge branch