Skip to content

Commit

Permalink
Build documentation from sources
Browse files Browse the repository at this point in the history
  • Loading branch information
tintou committed Nov 27, 2024
1 parent 3f7cdd7 commit fb0f7f5
Show file tree
Hide file tree
Showing 678 changed files with 39 additions and 50,012 deletions.
33 changes: 31 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches:
- main

env:
LATEST_VERSION: 3.0.18

jobs:
build:
name: Publish site
Expand All @@ -13,14 +16,40 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build and Deploy
- name: Replace version name
env:
GH_TOKEN: ${{ github.token }}
run: |
sed -i "s#v0\.19\.2#${{ env.LATEST_VERSION }}#g" content/_index.md
export GITHUB_PAGES_URL=$(gh api "repos/${{ github.repository }}/pages" --jq '.html_url')
sed -i "s#https:\/\/libical\.github\.io#${GITHUB_PAGES_URL}#g" config.toml
export GITHUB_CODE_WEBSITE="${{ github.server_url }}/${{ github.repository }}"
sed -i "s#https:\/\/github.com\/libical\/io.github.libical#${GITHUB_CODE_WEBSITE}#g" config.toml
- name: Build website
uses: shalzz/[email protected]
env:
BUILD_ONLY: true
- name: Checkout libical v${{ env.LATEST_VERSION }}
uses: actions/checkout@v4
with:
repository: libical/libical
ref: v${{ env.LATEST_VERSION }}
path: libical-sources
- name: Install dependencies
run: sudo apt-get -y install gtk-doc-tools xml-core libdb-dev gobject-introspection libgirepository1.0-dev cmake ninja-build doxygen graphviz
- name: Configure libical
run: |
cd libical-sources
mkdir build
cmake -B build -G Ninja -DENABLE_GTK_DOC=True -DICAL_GLIB=True -DGOBJECT_INTROSPECTION=True -DICAL_BUILD_DOCS=True
- name: Build libical documentation
run: |
cd libical-sources
cmake --build build --target docs
- name: Move Documentation
run: |
sudo rm -R public/docs/developer/libical
sudo mv public/apidocs public/docs/developer/libical
sudo mv libical-sources/build/apidocs/html public/docs/developer/libical
sudo rm -R public/docs/developer/libical-glib
sudo mv public/libical-glib public/docs/developer/libical-glib
- name: Upload Artifact
Expand Down
2 changes: 1 addition & 1 deletion content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ url = "/docs/getting-started/introduction/"
url_button = "Get started"
repo_version = "v3.0.18"
repo_license = "MPL v2.0 or LGPL v2.1 —"
repo_url = "https://github.com/aaranxu/adidoks"
repo_url = "https://github.com/libical/libical/"

# Menu items
[[extra.menu.main]]
Expand Down
22 changes: 7 additions & 15 deletions content/docs/maintainers/update-api-documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,17 @@ sort_by = "weight"
template = "docs/page.html"

[extra]
lead = "Update the public API documentation."
lead = "Update the Website and public API documentation."
toc = true
top = false
+++

Make sure you have Doxygen installed; else this will fail.
Clone the website:

Like so:

```bash
git checkout 3.0 #your stable branch
mkdir build-apidox; cd build-apidox
cmake -G Ninja .. && ninja docs
git checkout gh-pages
cd ..; rm -rf apidocs; cp -dpr build-apidox/apidocs/html apidocs
git add apidocs #make sure to include any newly generated files
git commit -m "update apidox" --no-verify . && git push
```
git clone https://github.com/libical/io.github.libical.git
```

view it on [https://libical.github.io/docs/developer/libical/](@/docs/developer/libical.md) (might take a couple minutes to update)

add the generated `build-apidox/libical.tag` file to the github release
Open the file in `.github/workflows/main.yml` and update `LATEST_VERSION` to the
new version. Commit and push to the repository to trigger a website and
documentation update.
187 changes: 0 additions & 187 deletions static/apidocs/annotated.html

This file was deleted.

122 changes: 0 additions & 122 deletions static/apidocs/astime_8h.html

This file was deleted.

Loading

0 comments on commit fb0f7f5

Please sign in to comment.