-
Notifications
You must be signed in to change notification settings - Fork 12
56 lines (48 loc) · 1.31 KB
/
main.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
name: build-and-publish
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
# JDK/Gradle
- name: Set up JDK 14
uses: actions/setup-java@v1
with:
java-version: 14
- uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Kotlin JS Build
run: ./gradlew compileKotlinJs
# NPM/UI
- uses: actions/setup-node@v2
with:
node-version: '12'
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: npm install
run: npm install
working-directory: ./ui
- name: npm build
run: npm run build
working-directory: ./ui
# Ship to gh-pages
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./ui/build
cname: tbcsim.com