-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (31 loc) · 1006 Bytes
/
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
name: Build Action
on:
push:
jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: actions/setup-node@v4
with:
node-version: "20.10.0"
- uses: actions/checkout@v4
- name: Install & Build
run: |
yarn install --immutable --immutable-cache --check-cache
yarn build
- name: Commit and Push generated dist
run: |
git config --global user.name 'ubiquity-os[bot]'
git config --global user.email 'ubiquity-os[bot]@users.noreply.github.com'
git add -f ${{ github.workspace }}/dist/\*
if [ -n "$(git diff-index --cached --name-only HEAD)" ]; then
git pull
git commit -m "chore: updated dist" || echo "Lint-staged check failed"
git push origin HEAD:${{ github.ref_name }}
else
echo "No changes to commit"
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}