5
5
branches :
6
6
- main
7
7
8
+ env :
9
+ LATEST_VERSION : 3.0.18
10
+
8
11
jobs :
9
12
build :
10
13
name : Publish site
@@ -13,14 +16,40 @@ jobs:
13
16
steps :
14
17
- name : Checkout
15
18
uses : actions/checkout@v4
16
- - name : Build and Deploy
19
+ - name : Replace version name
20
+ env :
21
+ GH_TOKEN : ${{ github.token }}
22
+ run : |
23
+ sed -i "s#v0\.19\.2#${{ env.LATEST_VERSION }}#g" content/_index.md
24
+ export GITHUB_PAGES_URL=$(gh api "repos/${{ github.repository }}/pages" --jq '.html_url')
25
+ sed -i "s#https:\/\/libical\.github\.io#${GITHUB_PAGES_URL}#g" config.toml
26
+ export GITHUB_CODE_WEBSITE="${{ github.server_url }}/${{ github.repository }}"
27
+ sed -i "s#https:\/\/github.com\/libical\/io.github.libical#${GITHUB_CODE_WEBSITE}#g" config.toml
28
+ - name : Build website
17
29
uses : shalzz/zola-deploy-action@v0.19.2
18
30
env :
19
31
BUILD_ONLY : true
32
+ - name : Checkout libical v${{ env.LATEST_VERSION }}
33
+ uses : actions/checkout@v4
34
+ with :
35
+ repository : libical/libical
36
+ ref : v${{ env.LATEST_VERSION }}
37
+ path : libical-sources
38
+ - name : Install dependencies
39
+ run : sudo apt-get -y install gtk-doc-tools xml-core libdb-dev gobject-introspection libgirepository1.0-dev cmake ninja-build doxygen graphviz
40
+ - name : Configure libical
41
+ run : |
42
+ cd libical-sources
43
+ mkdir build
44
+ cmake -B build -G Ninja -DENABLE_GTK_DOC=True -DICAL_GLIB=True -DGOBJECT_INTROSPECTION=True -DICAL_BUILD_DOCS=True
45
+ - name : Build libical documentation
46
+ run : |
47
+ cd libical-sources
48
+ cmake --build build --target docs
20
49
- name : Move Documentation
21
50
run : |
22
51
sudo rm -R public/docs/developer/libical
23
- sudo mv public/ apidocs public/docs/developer/libical
52
+ sudo mv libical-sources/build/ apidocs/html public/docs/developer/libical
24
53
sudo rm -R public/docs/developer/libical-glib
25
54
sudo mv public/libical-glib public/docs/developer/libical-glib
26
55
- name : Upload Artifact
0 commit comments