Skip to content

Commit 8cc2449

Browse files
authored
Merge pull request #185 from blairconrad/html-docs
Generate HTML documentation
2 parents cfb42f8 + 9ff597c commit 8cc2449

File tree

5 files changed

+38
-5
lines changed

5 files changed

+38
-5
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,8 @@ jobs:
5656
with:
5757
path: Documentation/git-absorb.1
5858
name: git-absorb.1
59+
- name: Upload HTML docs page as artifact
60+
uses: actions/upload-artifact@v4
61+
with:
62+
path: Documentation/git-absorb.html
63+
name: git-absorb.html

.github/workflows/release.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,16 @@ jobs:
7878
with:
7979
name: ${{ needs.create-release.outputs.GA_VERSION }}
8080
files: Documentation/git-absorb.1
81+
- name: Upload HTML docs as artifact
82+
uses: actions/upload-artifact@v4
83+
with:
84+
path: Documentation/git-absorb.html
85+
name: git-absorb.html
86+
- name: Attach HTML docs to release
87+
uses: softprops/action-gh-release@v2
88+
with:
89+
name: ${{ needs.create-release.outputs.GA_VERSION }}
90+
files: Documentation/git-absorb.html
8191

8292
build-release:
8393
name: build-release
@@ -155,6 +165,12 @@ jobs:
155165
name: git-absorb.1
156166
path: Documentation
157167

168+
- name: Download HTML docs
169+
uses: actions/download-artifact@v4
170+
with:
171+
name: git-absorb.html
172+
path: Documentation
173+
158174
- name: Build archive
159175
shell: bash
160176
run: |
@@ -163,7 +179,7 @@ jobs:
163179
mkdir -p "$staging"/doc
164180
165181
cp {README.md,LICENSE.md} "$staging/"
166-
cp Documentation/{git-absorb.1,git-absorb.adoc} "$staging/doc/"
182+
cp Documentation/{git-absorb.1,git-absorb.html,git-absorb.adoc} "$staging/doc/"
167183
168184
if [[ "${{ matrix.target }}" =~ .*windows.* ]]; then
169185
cp "target/${{ matrix.target }}/release/git-absorb.exe" "$staging/"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
/Documentation/git-absorb.1
2+
/Documentation/git-absorb.html
23
/target/
34
.idea

Documentation/Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
build-manpage: git-absorb.1
1+
build-documentation: git-absorb.1 git-absorb.html
22

33
git-absorb.1: git-absorb.adoc
44
$(if $(shell command -v a2x),,$(error "No a2x in PATH; install asciidoc."))
55
$(info Building manpage. This may take a few moments...)
66
a2x -L -d manpage -f manpage git-absorb.adoc --attribute man-version=${GA_VERSION}
77

8+
git-absorb.html: git-absorb.adoc
9+
$(if $(shell command -v a2x),,$(error "No a2x in PATH; install asciidoc."))
10+
11+
$(info Building HTML docs. This may take a few moments...)
12+
asciidoc -d manpage -b xhtml11 git-absorb.adoc
13+
814
clean:
915
rm -f git-absorb.1 git-absorb.xml

Documentation/README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
git-absorb manual
22
=================
33

4-
This project's man page `git-absorb.1` can be generated from `git-absorb.adoc`
4+
This project's documentation can be generated from [git-absorb.adoc][] as
5+
6+
* a man page (`git-absorb.1`) and
7+
* an HTML document (`git-absorb.html`)
8+
59
by running `make`.
610

711
Build dependencies
812
------------------
913

10-
- [asciidoc][] (tested with version 8.6.10)
14+
- [asciidoc][] (tested with version 10.2.0)
1115
- GNU Make
1216

13-
[asciidoc]: http://www.methods.co.nz/asciidoc/
17+
[asciidoc]: https://asciidoc.org/
18+
[git-absorb.adoc]: git-absorb.adoc

0 commit comments

Comments
 (0)