Docs website with mkdocs (#100)

* Fix build workflow

* Docs website with mkdocs (#99)

* Fix docs workflow

* Move mkdocs Docker file

* Ignore docs in build workflow

* Update workflows

* Update links

* Move upgrade notes to documentation

Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2020-06-19 22:47:17 +00:00
committed by GitHub
parent b5c584eca1
commit db2bce3bb3
77 changed files with 1695 additions and 924 deletions

View File

@@ -10,9 +10,10 @@ Contributions to this project are [released](https://help.github.com/articles/gi
2. Configure and install the dependencies: `go mod download`
3. Create a new branch: `git checkout -b my-branch-name`
4. Make your change
5. Build your code with [GoReleaser](https://goreleaser.com/): `goreleaser release --skip-publish --skip-validate --rm-dist`
6. Push to your fork and [submit a pull request](https://github.com/crazy-max/diun/compare)
7. Pat your self on the back and wait for your pull request to be reviewed and merged.
5. Test your code: `go test -covermode=atomic ./...`
6. Build with [GoReleaser](https://goreleaser.com/): `goreleaser release --skip-publish --skip-validate --rm-dist`
7. Push to your fork and [submit a pull request](https://github.com/crazy-max/diun/compare)
8. Pat your self on the back and wait for your pull request to be reviewed and merged.
Here are a few things you can do that will increase the likelihood of your pull request being accepted:

2
.github/SUPPORT.md vendored
View File

@@ -1,5 +1,7 @@
# Support [![](https://isitmaintained.com/badge/resolution/crazy-max/diun.svg)](https://isitmaintained.com/project/crazy-max/diun)
First, [be a good guy](https://github.com/kossnocorp/etiquette/blob/master/README.md).
## Reporting an issue
Please do a search in [open issues](https://github.com/crazy-max/diun/issues?utf8=%E2%9C%93&q=) to see if the issue or feature request has already been filed.

View File

@@ -9,12 +9,20 @@ on:
- 'v*'
paths-ignore:
- '**.md'
- '.github/workflows/docs.yml'
- 'docs/**'
- 'Dockerfile.mkdocs'
- 'mkdocs.yml'
pull_request:
branches:
- 'master'
- 'v*'
paths-ignore:
- '**.md'
- '.github/workflows/docs.yml'
- 'docs/**'
- 'Dockerfile.mkdocs'
- 'mkdocs.yml'
jobs:

49
.github/workflows/docs.yml vendored Normal file
View File

@@ -0,0 +1,49 @@
name: docs
on:
push:
branches:
- 'master'
- 'v*'
tags:
- 'v*'
paths:
- '.github/workflows/docs.yml'
- 'docs/**'
- 'Dockerfile.mkdocs'
- 'mkdocs.yml'
pull_request:
branches:
- 'master'
- 'v*'
paths:
- '.github/workflows/docs.yml'
- 'docs/**'
- 'Dockerfile.mkdocs'
- 'mkdocs.yml'
jobs:
publish:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Build mkdocs Docker image
run: |
docker build -t mkdocs -f ./Dockerfile.mkdocs ./
-
name: Build docs
run: |
docker run --rm -v "$(pwd):/docs" mkdocs build --strict
sudo chown -R $(id -u):$(id -g) ./site
-
name: Deploy
if: success() && github.event_name != 'pull_request' && endsWith(github.ref, github.event.repository.default_branch)
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: site
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}