GitHub Action
MkDocs Page Publisher
1.3.0
Latest version
Github Action to deploy MkDocs source files as Github Pages, supporting multiple config files.
A template (mkdocs-template) is available as a demo.
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.