From 4ec7349a04662bf8386af15a3023850bd947859b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Thu, 9 May 2024 20:33:24 +0200 Subject: [PATCH 1/2] workflows: Add build documentation job --- .github/workflows/documentation.yml | 55 +++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/documentation.yml diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml new file mode 100644 index 00000000..f47f9a36 --- /dev/null +++ b/.github/workflows/documentation.yml @@ -0,0 +1,55 @@ +on: + workflow_dispatch: + push: + branches: + - master + pull_request: + branches: + - master +name: "Documentation" +jobs: + documentation: + runs-on: ubuntu-latest + container: + image: registry.fedoraproject.org/fedora + options: --privileged + steps: + - name: Prepare + run: | + dnf -y install git gcc meson glib2-devel \ + gstreamer1-devel gstreamer1-plugins-base-devel \ + gtk4-devel libsoup3-devel libmicrodns-devel \ + gobject-introspection-devel graphviz gi-docgen + - name: Checkout + uses: actions/checkout@v4 + with: + persist-credentials: false + fetch-depth: 0 + - name: Build + run: | + meson setup builddir -Dauto_features=enabled \ + -Dclapper-app=disabled -Dvapi=disabled -Ddoc=true \ + -Dglimporter=auto -Dgluploader=auto -Drawimporter=auto + cd builddir + meson compile + - name: Commit files + if: ${{ success() && github.ref == 'refs/heads/master' }} + run: | + git config --global --add safe.directory $GITHUB_WORKSPACE + git checkout gh-pages + rm -rf doc/clapper/* + rm -rf doc/clapper-gtk/* + mv builddir/doc/reference/clapper/clapper.toml doc/clapper/ + mv builddir/doc/reference/clapper/clapper/* doc/clapper/ + mv builddir/doc/reference/clapper-gtk/clapper-gtk.toml doc/clapper-gtk/ + mv builddir/doc/reference/clapper-gtk/clapper-gtk/* doc/clapper-gtk/ + git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + git add doc/clapper/* doc/clapper-gtk/* + git commit -m "doc: Update" + - name: Push changes + uses: ad-m/github-push-action@master + if: ${{ success() && github.ref == 'refs/heads/master' }} + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: gh-pages From 419354fe8f7871693457174447e8e1c09405c239 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Thu, 9 May 2024 21:56:40 +0200 Subject: [PATCH 2/2] doc: Add "clapper" GIR path when building "clapper-gtk" doc Fixes building of clapper-gtk documentation on a clean system --- doc/reference/clapper-gtk/meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/reference/clapper-gtk/meson.build b/doc/reference/clapper-gtk/meson.build index 24590ace..2562161f 100644 --- a/doc/reference/clapper-gtk/meson.build +++ b/doc/reference/clapper-gtk/meson.build @@ -16,6 +16,7 @@ custom_target('clapper-gtk-doc', gi_docgen, 'generate', gi_docgen_common_args, + '--add-include-path=@0@'.format(join_paths(meson.project_build_root(), 'src', 'lib', 'clapper')), '--add-include-path=@0@'.format(join_paths(meson.project_build_root(), 'src', 'lib', 'clapper-gtk')), '--config=@INPUT0@', '--output-dir=@OUTPUT@',