Skip to content

Commit caa42f5

Browse files
authored
docs: add manpage (#8)
1 parent 27995d5 commit caa42f5

File tree

3 files changed

+77
-1
lines changed

3 files changed

+77
-1
lines changed

.github/workflows/ci.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,45 @@ jobs:
4848
run: poetry publish --build
4949
env:
5050
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
51+
build-pages:
52+
name: Build GitHub Pages
53+
runs-on: ubuntu-latest
54+
needs: tag
55+
steps:
56+
- name: Check out
57+
uses: actions/checkout@v4
58+
- name: Set up Ruby
59+
uses: ruby/setup-ruby@v1
60+
with:
61+
ruby-version: 3.3
62+
- name: Set up AsciiDoctor
63+
uses: reitzig/[email protected]
64+
with:
65+
version: 2.0.18
66+
- name: Generate man page
67+
run: |
68+
curl https://mtth.github.io/d/asciidoctor.css \
69+
-o docs/asciidoctor.css
70+
mkdir dist
71+
asciidoctor -b html docs/git-draft.adoc \
72+
-a stylesheet=asciidoctor.css \
73+
-a manversion=${{ needs.tag.outputs.new-version }} \
74+
-o dist/index.html
75+
- name: Upload as artifact
76+
uses: actions/upload-pages-artifact@v3
77+
with:
78+
path: dist/
79+
deploy-pages:
80+
name: Deploy GitHub Pages
81+
runs-on: ubuntu-latest
82+
needs: build-pages
83+
environment:
84+
name: github-pages
85+
url: ${{ steps.deploy.outputs.page_url }}
86+
permissions:
87+
id-token: write
88+
pages: write
89+
steps:
90+
- name: Deploy
91+
id: deploy
92+
uses: actions/deploy-pages@v4

docs/git-draft.adoc

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
ifndef::manversion[:manversion: 0.0.0]
2+
3+
= git-traft(1)
4+
Matthieu Monsch
5+
v{manversion}
6+
:doctype: manpage
7+
:manmanual: GIT-DRAFT
8+
:mansource: GIT-DRAFT
9+
10+
11+
== Name
12+
13+
git-draft - a git-friendly way to edit code
14+
15+
16+
== Synopsis
17+
18+
*git-draft* _-C_ _NAME_
19+
20+
*git-draft* _-P_
21+
22+
*git-draft* _-A_
23+
24+
*git-draft* _-D_
25+
26+
27+
== Description
28+
29+
TODO
30+
31+
32+
== See also
33+
34+
_git(1)_

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ version = '0.0.0' # Set programmatically
88
description = 'Version-controlled code assistant'
99
authors = ['Matthieu Monsch <[email protected]>']
1010
readme = 'README.md'
11-
repository = 'https://github.com/mtth/draft'
11+
repository = 'https://github.com/mtth/git-draft'
1212
packages = [{include = 'git_draft', from = 'src'}]
1313

1414
[tool.poetry.scripts]

0 commit comments

Comments
 (0)