Skip to content

Commit c4a5e21

Browse files
committed
Add cd for frontend build
1 parent 0e690af commit c4a5e21

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/frontend-cd.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Frontend Build CD
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
- uses: actions/setup-node@v3
14+
with:
15+
node-version: '20'
16+
- name: Build frontend
17+
run: |
18+
cd frontend
19+
npm ci
20+
npm run build
21+
- name: Commit build
22+
run: |
23+
git config --global user.email "github-actions@github.com'
24+
git config --global user.name "GitHub Actions"
25+
git add frontend/dist
26+
git commit -m "Build frontend" || echo "No changes to commit"
27+
git push

0 commit comments

Comments
 (0)