Skip to content
globe

GitHub Action

MkDocs Page Publisher

1.3.0 Latest version

MkDocs Page Publisher

globe

MkDocs Page Publisher

Deploy MkDocs source files as Github Pages. Multi-languages can be handled by providing config files

Installation

Copy and paste the following snippet into your .yml file.

              

- name: MkDocs Page Publisher

uses: Kjuly/mkdocs-page-publisher@1.3.0

Learn more about this action in Kjuly/mkdocs-page-publisher

Choose a version

mkdocs-page-publisher

Github Action to deploy MkDocs source files as Github Pages, supporting multiple config files.

A template (mkdocs-template) is available as a demo.

Usage

The mkdocs.yml in the root directory will be used by default.

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
  contents: read
  pages: write
  id-token: write

jobs:
  publish:
    name: Publish MkDocs Pages
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Publish Pages
        id: deployment
        uses: Kjuly/mkdocs-page-publisher@main

If you have multiple config files to handle multi-languages, you can provide config_files:

uses: Kjuly/mkdocs-page-publisher@main
with:
  config_files: |-
    config/en/mkdocs.yml
    config/zh-Hans/mkdocs.yml

If you just want to build pages and deploy to other page hosts, you can use MkDocs Page Builder.