mirror of
https://github.com/crazy-max/diun.git
synced 2025-12-27 07:31:37 +01:00
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:
7
.github/CONTRIBUTING.md
vendored
7
.github/CONTRIBUTING.md
vendored
@@ -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
2
.github/SUPPORT.md
vendored
@@ -1,5 +1,7 @@
|
||||
# Support [](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.
|
||||
|
||||
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
@@ -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
49
.github/workflows/docs.yml
vendored
Normal 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 }}
|
||||
Reference in New Issue
Block a user