release 0.1.1
[liba.git] / .github / workflows / docs.yml
blob78131317618f90ec500f857d3f652cfd57410ef5
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         run: |
43           set -x
44           cmake -S . -B build -DLIBA_DOXYGEN=1 \
45                               -DLIBA_LUA=1 -DLIBA_LDOC=1 \
46                               -DLIBA_JAVA=1 -DLIBA_JAVADOC=1
47           cmake --build build --target adoc
48           cargo doc --release --no-deps
49       - uses: actions/checkout@v4
50         with:
51           lfs: true
52           submodules: true
53           repository: ${{ github.repository_owner }}/tqfx.github.io
54           path: _/${{ github.repository_owner }}
55       - name: Update docs
56         run: |
57           set -x
58           rm -rf _/${{ github.repository }}
59           mv build/html _/${{ github.repository }}
60           mv target/doc _/${{ github.repository }}/rust
61           mv build/lua/doc _/${{ github.repository }}/lua
62           mv build/java/javadoc/liba _/${{ github.repository }}/java
63       - uses: peaceiris/actions-gh-pages@v3
64         with:
65           deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
66           commit_message: ${{ github.event.head_commit.message }}
67           external_repository: ${{ github.repository_owner }}/tqfx.github.io
68           publish_dir: _/${{ github.repository_owner }}
69       - name: Run autotools
70         run: script/autogen
71       - uses: actions/upload-artifact@v2
72         with:
73           if-no-files-found: ignore
74           name: ${{ github.sha }}
75           path: build/*.tar.*