fix bugprone-multi-level-implicit-pointer-conversio
[liba.git] / .github / workflows / docs.yml
blob04b0309cf7fa4a53830a67eab22f23f13c8bf1d3
1 name: docs
2 on:
3   push:
4     branches: [ main ]
5   pull_request:
6     branches: [ main ]
7   workflow_dispatch:
8 jobs:
9   docs:
10     runs-on: ubuntu-latest
11     steps:
12       - uses: actions/checkout@v4
13         with:
14           lfs: true
15           submodules: true
16       - name: Run apt-get
17         run: |
18           set -x
19           sudo apt-get -y update
20           sudo apt-get -y install graphviz mscgen dia
21           sudo apt-get -y install lua5.4 liblua5.4-dev
22       - name: Install doxygen
23         run: |
24           set -x
25           curl https://www.doxygen.nl/files/doxygen-1.10.0.linux.bin.tar.gz | tar -xzf -
26           cd doxygen-1.10.0
27           sudo make install
28       - uses: actions/checkout@v4
29         with:
30           repository: luarocks/luarocks
31           path: luarocks
32       - name: Install luarocks
33         working-directory: luarocks
34         run: |
35           set -x
36           ./configure
37           make
38           sudo make install
39       - name: Install LDoc
40         run: sudo luarocks install ldoc
41       - name: Build docs
42         env:
43           CC: clang
44           CXX: clang++
45         run: |
46           set -x
47           cmake -S . -B build -DLIBA_DOXYGEN=1 \
48                      -DLIBA_LUA=1 -DLIBA_LDOC=1 \
49                      -DLIBA_JAVA=1 -DLIBA_JAVADOC=1
50           cmake --build build --target adoc
51           cargo doc --release --no-deps -vv
52       - uses: actions/checkout@v4
53         with:
54           lfs: true
55           submodules: true
56           repository: ${{ github.repository_owner }}/tqfx.github.io
57           path: _/${{ github.repository_owner }}
58       - name: Update docs
59         run: |
60           set -x
61           rm -rf _/${{ github.repository }}
62           mv build/html _/${{ github.repository }}
63           mv target/doc _/${{ github.repository }}/rust
64           mv build/lua/doc _/${{ github.repository }}/lua
65           mv build/java/javadoc/liba _/${{ github.repository }}/java
66       - uses: peaceiris/actions-gh-pages@v3
67         with:
68           deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
69           external_repository: ${{ github.repository_owner }}/tqfx.github.io
70           publish_dir: _/${{ github.repository_owner }}
71       - name: Run autotools
72         run: script/autogen
73       - uses: actions/upload-artifact@v4
74         with:
75           if-no-files-found: ignore
76           name: ${{ github.sha }}
77           path: build/*.tar.*