-
Notifications
You must be signed in to change notification settings - Fork 30
69 lines (55 loc) · 1.93 KB
/
www.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
name: publish www
on:
workflow_dispatch:
workflow_call:
push:
branches:
- master
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Set up Nodejs 20
uses: actions/setup-node@v3
with:
node-version: 20
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Generating API docs
run: ./gradlew dokkaHtmlMultiModule
- name: Build Demos
run: ./gradlew build metadataToWww
- name: Build Webpage
working-directory: ./www
run: export NODE_OPTIONS=--openssl-legacy-provider && npm install && npm run build
- name: Copy api docs to webpage
run: mkdir -p ./www/_site/api && cp -r ./api/* ./www/_site/api
- name: Copy headless-demo files to webpage
run: mkdir -p ./www/_site/headless-demo && cp ./headless-demo/build/dist/js/productionExecutable/* ./www/_site/headless-demo
- name: Copy snippets files to webpage
run: mkdir -p ./www/_site/snippets && cp ./snippets/build/dist/js/productionExecutable/* ./www/_site/snippets
- name: Copy example distributions to webpage
run: >
for directory in `ls ./examples/* -d`; do
name=`basename $directory`;
mkdir -p ./www/_site/examples/$name;
cp ./examples/$name/build/dist/js/productionExecutable/* ./www/_site/examples/$name;
done
- name: Deploy to GitHub Pages
if: success()
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
jekyll: false
fqdn: next.fritz2.dev
build_dir: ./www/_site
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}