-
Notifications
You must be signed in to change notification settings - Fork 30
48 lines (45 loc) · 1.18 KB
/
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
name: Update Build
on:
push:
branches:
- main
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
if: github.repository_owner == 'receptron'
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: yarn install
- run: yarn run build
- run: yarn run format
- run: yarn run monoRepoAgentDoc
- run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
git add packages/*/lib/* docs/agentDocs/* docs/apiDoc/*
- name: Commit
run: |
if [ $(git diff --name-only --cached | wc -l) != 0 ]; then
git commit -m "Update lib or docs" packages/*/lib/ docs/agentDocs/* docs/apiDoc/*
git push origin main
else
echo "No change on lib"
fi
- name: Commit
run: |
if [ $(git diff | wc -l) != 0 ]; then
git commit -m "format" .
git push origin main
else
echo "No change format"
fi