forked from FabricMC/fabric-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (90 loc) · 2.72 KB
/
build.yaml
File metadata and controls
96 lines (90 loc) · 2.72 KB
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Build
on:
pull_request:
types: [opened, ready_for_review, synchronize]
push:
branches: [main]
workflow_dispatch:
concurrency:
group: build-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
docs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- run: npm ci
- run: npm run build
- if: github.event_name != 'pull_request'
uses: actions/configure-pages@v4
- if: github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@v3
with:
path: ./.vitepress/dist
mod:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- run: ./gradlew build --stacktrace --warning-mode fail
working-directory: ./reference
- run: ./gradlew runDatagen --stacktrace --warning-mode fail
working-directory: ./reference
- if: failure()
uses: FabricMCBot/publish-checkstyle-report@4627c82002aa370b6cb2a3140f34c7a8c55a5297
with:
reports: reference/**/build/reports/checkstyle/*.xml
# require clean working directory
- run: |
readarray -d '' files < <(git ls-files --modified --others --exclude-standard -z)
[[ ${#files[@]} -eq 0 ]] && exit 0
for f in "${files[@]}"; do
echo "::error file=${f},title=Datagen::Regenerate this file with 'cd reference && ./gradlew runDatagen'"
done
exit 1
# :::automatic-testing:game-test:3
client_game_test:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- run: ./gradlew runProductionClientGameTest
# :::automatic-testing:game-test:3
working-directory: ./reference
# :::automatic-testing:game-test:3
- if: always()
uses: actions/upload-artifact@v4
with:
path: build/run/clientGameTest/screenshots
# :::automatic-testing:game-test:3
- if: always()
uses: actions/upload-artifact@v4
with:
path: reference/build/run/clientGameTest/screenshots
deploy:
runs-on: ubuntu-24.04
if: github.event_name != 'pull_request'
needs:
- docs
- mod
- client_game_test
permissions:
pages: write
id-token: write
steps:
- id: deployment
uses: actions/deploy-pages@v4
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}