-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (47 loc) · 1.33 KB
/
web.yaml
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
49
50
51
52
53
54
55
name: web
on:
push:
branches:
- main
paths:
- 'web/**'
- '.github/workflows/web.yaml'
permissions:
contents: write
jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set node
uses: actions/setup-node@v4
with:
node-version: 20
cache-dependency-path: web/pnpm-lock.yaml
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-go@v5
with:
go-version: '1.22.3'
- name: Build web
run: |-
cd web
pnpm i
pnpm build
cd ..
- name: Upload to jaronnie/jzero-admin-deploy-web
run: |
go install github.com/jaronnie/grum@latest
GITHUB_TOKEN=${{ secrets.ACCESS_TOKEN }} grum clone https://github.com/jaronnie/jzero-admin-deploy-web
cd jzero-admin-deploy-web
git config user.name "dependabot[bot]"
git config user.email "49699333+dependabot[bot]@users.noreply.github.com"
find . -type f -mindepth 1 ! -path "./vercel.json" ! -path "./.git/*" -exec rm -rf {} +
mv ../web/dist/* ./
git add .
git diff-index --quiet HEAD || git commit -m "feat(web): update"
git push -f