Skip to content

Add Wiki Build #228

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/build-wiki.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: 'Build Wiki'

on:
repository_dispatch:
types: [build-wiki]
workflow_dispatch:

jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Checkout wiki repo
uses: actions/checkout@v3
with:
repository: NLog/NLog.wiki
path: _wiki/wiki-src
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- run: pip install -r _wiki/requirements.txt
- run: mkdocs build --config-file _wiki/mkdocs.yml
- name: Commit files
run: |
cd ./wiki
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add ./
git commit -m "Build Wiki" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: master
directory: ./wiki
16 changes: 16 additions & 0 deletions _wiki/mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
site_name: NLog Wiki
site_url: https://nlog-project.org/wiki
repo_url: https://github.com/NLog/NLog/wiki
docs_dir: wiki-src
site_dir: ../wiki
strict: false
plugins:
- search
- ezlinks
- github-wiki-edit-url
- redirects:
redirect_maps:
index.md: Home.md
theme:
name: readthedocs
logo: https://nlog-project.org/images/NLog-logo-only_small.png
4 changes: 4 additions & 0 deletions _wiki/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
mkdocs
mkdocs-ezlinks-plugin
mkdocs-github-wiki-edit-url
mkdocs-redirects
1 change: 1 addition & 0 deletions _wiki/wiki-src
Submodule wiki-src added at 4a5cd5