-
Notifications
You must be signed in to change notification settings - Fork 6
44 lines (38 loc) · 1 KB
/
build_app.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
name: App
on:
push:
branches:
- main
paths:
- app/**
jobs:
build:
name: Build App
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18.x
- name: Run install
uses: borales/actions-yarn@v5
with:
cmd: install
dir: ./app
- name: Build production bundle
uses: borales/actions-yarn@v5
with:
cmd: build
dir: ./app
- name: Update 'build' branch
run: |
git config user.name github-actions
git config user.email [email protected]
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
git switch --orphan build
mv ./app/dist/* .
rm -rf ./app
git add .
git commit -am "Created distributables"
git push --force --set-upstream origin build