-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (68 loc) · 1.76 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: build
on:
push:
branches:
- main
jobs:
build:
strategy:
matrix:
platform: [ubuntu-latest]
name: Build
runs-on: ${{ matrix.platform }}
steps:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "18"
registry-url: "https://registry.npmjs.org"
- uses: pnpm/action-setup@v2.2.4
name: Install pnpm
id: pnpm-install
with:
version: 8
run_install: false
- name: Checkout
uses: actions/checkout@v3
with:
ref: main
path: alist-web
persist-credentials: false
fetch-depth: 0
submodules: recursive
- name: Checkout dist repo
uses: actions/checkout@v3
with:
repository: alist-org/web-dist
ref: dev
path: web-dist
persist-credentials: false
fetch-depth: 0
- name: Build
run: |
cd alist-web
pnpm install
pnpm i18n:build
pnpm build
cd ..
env:
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
- name: Commit dist
run: |
cd web-dist
rm -rf dist
cp -r ../alist-web/dist .
git add .
git config --local user.email "i@nn.ci"
git config --local user.name "Noah Hsu"
git commit --amend -m "upload dev dist"
cd ..
- name: Upload dist files
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.MY_TOKEN }}
branch: dev
directory: web-dist
repository: alist-org/web-dist
force: true