-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (79 loc) · 2.44 KB
/
deploy_web.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
78
79
80
81
82
83
84
85
86
87
name: deploy web
on:
push:
branches: [main]
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: changes
with:
filters: |
shared:
- 'shared/**'
eungabi:
- 'eungabi/**'
- name: Restore cached gradle
id: cache-gradle-restore
uses: actions/cache/restore@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
eungabi/build
shared/build
key: ${{ runner.os }}-gradle-caches
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material
- run: mkdocs build
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Build Compose Multiplatform Web App targeting JS(IR)
if: steps.changes.outputs.shared == 'true' || steps.cache-gradle-restore.outputs.cache-hit != 'true'
run: |
./gradlew :shared:jsBrowserDistribution
- name: Generate API Docs
run: |
./gradlew :eungabi:dokkaHtml
- name: Cache gradle caches
id: cache-gradle-save
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
eungabi/build
shared/build
key: ${{ steps.cache-gradle-restore.outputs.cache-primary-key }}
- name: Load files from cache
if: steps.cache-gradle-save.outputs.cache-hit == 'true'
run: |
mkdir -p site/sampleApp
cp -r shared/build/dist/js/productionExecutable/* site/sampleApp
mkdir -p site/api
cp -r eungabi/build/dokka/html/* site/api
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.TOKEN_GITHUB }}
publish_dir: ./site