-
Notifications
You must be signed in to change notification settings - Fork 2
77 lines (63 loc) · 1.76 KB
/
build-static.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
77
name: Build manual with static method
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
lfs: false
- name: Set Node.js version
uses: actions/setup-node@v3
with:
node-version: 16
- name: Set Python version to 3.10.x
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Use pnpm instead npm
uses: pnpm/action-setup@v4
with:
version: 8
run_install: false
- name: Prepare environments
run: |
cd GameMakerManualExport
pnpm install
pnpm run init:build
- name: Import translations to manual
run: |
cd GameMakerManualExport
pnpm run static:gendep
pnpm run static:import
pnpm run static:team
- name: Clean temp files
run: |
cd GameMakerManualExport
pnpm run clean:temp
cd ..
- name: Minify all files
run: |
cd GameMakerManualExport
gulp
cd ..
- name: Generate index.html
run: |
cp build/index.htm build/index.html
- name: Add Azure Static Web workflow
run: |
mkdir -p build/.github/workflows/
cp patch/azure-static-web-apps-static-method.yml build/.github/workflows/
- name: Deploy to static branch
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
repository-name: GamemakerChina/manual-static
token: ${{ secrets.ACCESS_TOKEN }}
branch: main
folder: build