diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4d7fcc8..5b96aa4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -48,3 +48,45 @@ jobs: run: poetry publish --build env: POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }} + build-pages: + name: Build GitHub Pages + runs-on: ubuntu-latest + needs: tag + steps: + - name: Check out + uses: actions/checkout@v4 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.3 + - name: Set up AsciiDoctor + uses: reitzig/actions-asciidoctor@v2.0.2 + with: + version: 2.0.18 + - name: Generate man page + run: | + curl https://mtth.github.io/d/asciidoctor.css \ + -o docs/asciidoctor.css + mkdir dist + asciidoctor -b html docs/git-draft.adoc \ + -a stylesheet=asciidoctor.css \ + -a manversion=${{ needs.tag.outputs.new-version }} \ + -o dist/index.html + - name: Upload as artifact + uses: actions/upload-pages-artifact@v3 + with: + path: dist/ + deploy-pages: + name: Deploy GitHub Pages + runs-on: ubuntu-latest + needs: build-pages + environment: + name: github-pages + url: ${{ steps.deploy.outputs.page_url }} + permissions: + id-token: write + pages: write + steps: + - name: Deploy + id: deploy + uses: actions/deploy-pages@v4 diff --git a/docs/git-draft.adoc b/docs/git-draft.adoc new file mode 100644 index 0000000..c970e7e --- /dev/null +++ b/docs/git-draft.adoc @@ -0,0 +1,34 @@ +ifndef::manversion[:manversion: 0.0.0] + += git-traft(1) +Matthieu Monsch +v{manversion} +:doctype: manpage +:manmanual: GIT-DRAFT +:mansource: GIT-DRAFT + + +== Name + +git-draft - a git-friendly way to edit code + + +== Synopsis + +*git-draft* _-C_ _NAME_ + +*git-draft* _-P_ + +*git-draft* _-A_ + +*git-draft* _-D_ + + +== Description + +TODO + + +== See also + +_git(1)_ diff --git a/pyproject.toml b/pyproject.toml index 82d25ea..70d5f0a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ version = '0.0.0' # Set programmatically description = 'Version-controlled code assistant' authors = ['Matthieu Monsch '] readme = 'README.md' -repository = 'https://github.com/mtth/draft' +repository = 'https://github.com/mtth/git-draft' packages = [{include = 'git_draft', from = 'src'}] [tool.poetry.scripts]