Skip to content

Commit

Permalink
Touching up more mkdocs details
Browse files Browse the repository at this point in the history
  • Loading branch information
meatballhat committed May 9, 2022
1 parent 8da1afc commit c468566
Show file tree
Hide file tree
Showing 8 changed files with 58 additions and 7 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/cli.yml
Expand Up @@ -92,3 +92,17 @@ jobs:
run: |
git diff --exit-code
git diff --cached --exit-code
publish:
if: startswith(github.ref, 'refs/tags/')
name: publish
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Publish Docs
uses: mhausenblas/mkdocs-deploy-gh-pages@master
env:
GITHUB_TOKEN: ${{ secrets.MKDOCS_PUBLISH_GITHUB_TOKEN }}
REQUIREMENTS: mkdocs-requirements.txt
2 changes: 1 addition & 1 deletion .gitignore
@@ -1,10 +1,10 @@
*.coverprofile
*.orig
node_modules/
vendor
.idea
internal/*/built-example
coverage.txt
/.local/
/site/

*.exe
12 changes: 12 additions & 0 deletions Makefile
Expand Up @@ -30,3 +30,15 @@ gfmrun:
.PHONY: toc
toc:
go run internal/build/build.go toc docs/v2/manual.md

.PHONY: docs
docs:
mkdocs build

.PHONY: docs-deps
docs-deps:
pip install -r mkdocs-requirements.txt

.PHONY: serve-docs
serve-docs:
mkdocs serve
1 change: 1 addition & 0 deletions docs/CNAME
@@ -0,0 +1 @@
cli.urfave.org
1 change: 1 addition & 0 deletions docs/CODE_OF_CONDUCT.md
22 changes: 22 additions & 0 deletions docs/CONTRIBUTING.md
Expand Up @@ -98,6 +98,28 @@ line help system which may be consulted for further information, e.g.:
go run internal/genflags/cmd/genflags/main.go --help
```

#### docs output

The documentation in the `docs` directory is automatically built via `mkdocs` into a
static site and published when releases are pushed (see [RELEASING](./RELEASING/)). There
is no strict requirement to build the documentation when developing locally, but the
following `make` targets may be used if desired:

```sh
# install documentation dependencies with `pip`
make docs-deps
```

```sh
# build the static site in `./site`
make docs
```

```sh
# start an mkdocs development server
make serve-docs
```

### pull requests

Please feel free to open a pull request to fix a bug or add a feature. The @urfave/cli
Expand Down
5 changes: 3 additions & 2 deletions docs/index.md
Expand Up @@ -16,5 +16,6 @@ These are the guides for each major supported version:

In addition to the version-specific guides, these other documents are available:

- [`CONTRIBUTING`](./CONTRIBUTING/)
- [`RELEASING`](./RELEASING/)
- [CONTRIBUTING](./CONTRIBUTING/)
- [CODE OF CONDUCT](./CODE_OF_CONDUCT/)
- [RELEASING](./RELEASING/)
8 changes: 4 additions & 4 deletions mkdocs-requirements.txt
@@ -1,4 +1,4 @@
mkdocs
mkdocs-material
mkdocs-git-revision-date-localized-plugin
pygments
mkdocs~=1.3
mkdocs-material~=8.2
mkdocs-git-revision-date-localized-plugin~=1.0
pygments~=2.12

0 comments on commit c468566

Please sign in to comment.