diff --git a/.github/workflows/build-wiki.yml b/.github/workflows/build-wiki.yml new file mode 100644 index 000000000..3109ecb38 --- /dev/null +++ b/.github/workflows/build-wiki.yml @@ -0,0 +1,45 @@ +name: 'Build Wiki' + +on: + repository_dispatch: + types: [build-wiki] + workflow_dispatch: + +permissions: + contents: read + +jobs: + check: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + steps: + - name: Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + ref: master + fetch-depth: 0 + persist-credentials: false + - name: Checkout wiki repo + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + repository: NLog/NLog.wiki + path: _wiki/wiki-src + persist-credentials: false + - uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 + with: + python-version: '3.15' + - run: pip install -r _wiki/requirements.txt + - run: mkdocs build --config-file _wiki/mkdocs.yml + - name: Create or update pull request + uses: peter-evans/create-pull-request@3ffccacd46053766916f087ce41d627c0b8cf2d1 # v8.1.3 + with: + token: ${{ github.token }} + add-paths: wiki/ + branch: build-wiki + commit-message: Update Wiki + author: 'NLog.github.io Action ' + committer: 'NLog.github.io Action ' + title: Update Wiki + body: 'Automated update of the generated wiki site.' \ No newline at end of file diff --git a/_wiki/mkdocs.yml b/_wiki/mkdocs.yml new file mode 100644 index 000000000..1c3ea469e --- /dev/null +++ b/_wiki/mkdocs.yml @@ -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 \ No newline at end of file diff --git a/_wiki/requirements.txt b/_wiki/requirements.txt new file mode 100644 index 000000000..f6b6a08c3 --- /dev/null +++ b/_wiki/requirements.txt @@ -0,0 +1,4 @@ +mkdocs +mkdocs-ezlinks-plugin +mkdocs-github-wiki-edit-url +mkdocs-redirects \ No newline at end of file diff --git a/_wiki/wiki-src b/_wiki/wiki-src new file mode 160000 index 000000000..4a5cd5ee0 --- /dev/null +++ b/_wiki/wiki-src @@ -0,0 +1 @@ +Subproject commit 4a5cd5ee03c509866f0f8ee91f5fc5110a9910d1