-
Notifications
You must be signed in to change notification settings - Fork 1
74 lines (74 loc) · 2.38 KB
/
Copy pathdocs.yml
File metadata and controls
74 lines (74 loc) · 2.38 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
name: docs
on:
push:
branches: [ main ]
paths:
- 'java/src/**.java'
- 'lua/src/**.[ch]*'
- 'include/**.h*'
- 'Cargo.toml'
- 'src/**.rs'
- 'README.md'
workflow_dispatch:
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true
submodules: true
- name: Run apt-get
run: |
set -x
sudo apt-get -y update
sudo apt-get -y install graphviz mscgen dia
sudo apt-get -y install lua5.4 liblua5.4-dev
- uses: actions/checkout@v4
with:
repository: luarocks/luarocks
path: _/luarocks
- name: Install luarocks
working-directory: _/luarocks
run: |
set -x
./configure && make && sudo make install
sudo luarocks install ldoc
- name: Install doxygen
run: |
for item in $(curl -s https://api.github.com/repos/doxygen/doxygen/releases/latest | jq -c .assets[] -r); do
if [[ $(echo $item | jq .name) == *linux* ]]; then
curl -L $(echo $item | jq .browser_download_url -r) | tar --strip-components=1 -xzC _
fi
done
- name: Build docs
env:
CC: clang
CXX: clang++
CMAKE_PREFIX_PATH: ${{ github.workspace }}/_
run: |
set -x
cmake -S . -B build -DLIBA_DOXYGEN=1 \
-DLIBA_LUA=1 -DLIBA_LDOC=1 \
-DLIBA_JAVA=1 -DLIBA_JAVADOC=1
cmake --build build --target adoc
cargo doc --release --no-deps -vv
- uses: actions/checkout@v4
with:
lfs: true
submodules: true
repository: ${{ github.repository_owner }}/tqfx.github.io
path: _/${{ github.repository_owner }}
- name: Update docs
run: |
set -x
rm -rf _/${{ github.repository }}
mv build/html _/${{ github.repository }}
mv target/doc _/${{ github.repository }}/rust
mv build/lua/doc _/${{ github.repository }}/lua
mv build/java/javadoc/liba _/${{ github.repository }}/java
- uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
external_repository: ${{ github.repository_owner }}/tqfx.github.io
publish_dir: _/${{ github.repository_owner }}