Skip to content

Commit ee0589c

Browse files
committed
CI: Add publish-docs.yml
1 parent 5711e2b commit ee0589c

File tree

3 files changed

+92
-3
lines changed

3 files changed

+92
-3
lines changed

.github/workflows/publish-docs.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
2+
3+
# Copied from https://github.com/libsigcplusplus/libsigcplusplus/actions/new
4+
# and changed. Actions -> New workflow -> Pages -> GitHub Pages Jekyll
5+
6+
name: Deploy Jekyll with GitHub Pages dependencies preinstalled
7+
8+
# 2022-12-17: ubuntu-latest = ubuntu-22.04
9+
on:
10+
# Runs on pushes targeting the default branch
11+
push:
12+
branches: ["master"]
13+
14+
# Allows you to run this workflow manually from the Actions tab
15+
workflow_dispatch:
16+
17+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
18+
permissions:
19+
contents: read
20+
pages: write
21+
id-token: write
22+
23+
# Allow one concurrent deployment
24+
concurrency:
25+
group: "pages"
26+
cancel-in-progress: true
27+
28+
jobs:
29+
# Build job
30+
build:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@v3
35+
- name: Build
36+
run: |
37+
# Prevent blocking apt install on a question during configuring of tzdata.
38+
export ENV DEBIAN_FRONTEND=noninteractive
39+
sudo apt update
40+
sudo apt install libxml2-utils docbook5-xml docbook-xsl mm-common g++ meson ninja-build python3-setuptools python3-pip --yes
41+
meson -Dbuild-documentation=true -Dbuild-examples=false -Dbuild-tests=false _build
42+
meson compile -C _build
43+
- name: Collect Documentation
44+
# Collect all documentation to be published.
45+
run: |
46+
mkdir _publish _publish/_layouts _publish/pix _publish/manual _publish/reference
47+
# Copy files from the git repository.
48+
cp docs/_config.yml docs/*.md docs/style.css _publish
49+
cp docs/_layouts/*.html _publish/_layouts
50+
cp docs/pix/logo.gif _publish/pix
51+
# Move generated documentation.
52+
mv _build/docs/docs/manual/html _publish/manual
53+
mv _build/docs/docs/reference/html _publish/reference
54+
- name: Setup Pages
55+
uses: actions/configure-pages@v2
56+
- name: Build with Jekyll
57+
uses: actions/jekyll-build-pages@v1
58+
with:
59+
source: ./_publish
60+
destination: ./_site
61+
- name: Upload artifact
62+
uses: actions/upload-pages-artifact@v1
63+
64+
# Deployment job
65+
# Publish documentation at https://libsigcplusplus.github.io/libsigcplusplus/
66+
deploy:
67+
environment:
68+
name: github-pages
69+
url: ${{ steps.deployment.outputs.page_url }}
70+
runs-on: ubuntu-latest
71+
needs: build
72+
steps:
73+
- name: Deploy to GitHub Pages
74+
id: deployment
75+
uses: actions/deploy-pages@v1
76+

docs/_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
name: libsigc++
1+
title: libsigc++

docs/doc.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,21 @@ layout: default
33
title: Documentation
44
---
55

6-
We have both [tutorial-style](http://developer.gnome.org/libsigc++-tutorial/stable/)
7-
and [reference](http://developer.gnome.org/libsigc++/stable/) documentation.
6+
## libsigc++-2.0
7+
8+
We have [tutorial-style](https://developer-old.gnome.org/libsigc++-tutorial/2.10/)
9+
and [reference](https://developer-old.gnome.org/libsigc++/2.10/) documentation.
10+
11+
This documentation is frozen on the web. It does not document the latest release.
12+
If you want newer documentation, you can download a tarball from
13+
[GitHub releases](https://github.com/libsigcplusplus/libsigcplusplus/releases/)
14+
or the [GNOME download site](https://download.gnome.org/sources/libsigc++/),
15+
extract it, and view the documentation at *untracked/docs/*.
16+
17+
## libsigc++-3.0
18+
19+
The latest [tutorial-style](manual/html/index.html) and [reference](reference/html/index.html)
20+
documentation is available on the web.
821

922
## Glossary of terms
1023

0 commit comments

Comments
 (0)