-
Notifications
You must be signed in to change notification settings - Fork 4
35 lines (32 loc) · 862 Bytes
/
ci.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
name: CI
on:
push:
branches: ["main", "develop"]
pull_request:
branches: ["main", "develop"]
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: "20"
cache: "npm"
- run: npm ci
- run: npm run build --if-present
- run: npm test
- name: Configure Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Push changes
run: |
git add -A
git commit -m "chore: commit changes from build"
git push
if: success() && steps.build.outputs.changes_detected == 'true'