Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kjuly/mkdocs-page-publisher
Github Action to deploy MkDocs source files as Github Pages, supporting multiple config files.
https://github.com/kjuly/mkdocs-page-publisher
build deploy github-action github-pages i18n mkdocs publish
Last synced: 22 days ago
JSON representation
Github Action to deploy MkDocs source files as Github Pages, supporting multiple config files.
- Host: GitHub
- URL: https://github.com/kjuly/mkdocs-page-publisher
- Owner: Kjuly
- License: mit
- Created: 2024-05-05T12:48:14.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-07-02T13:08:56.000Z (6 months ago)
- Last Synced: 2024-12-18T20:14:01.052Z (22 days ago)
- Topics: build, deploy, github-action, github-pages, i18n, mkdocs, publish
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mkdocs-page-publisher
Github Action to deploy MkDocs source files as Github Pages, supporting multiple config files.A template ([mkdocs-template](https://github.com/Kjuly/mkdocs-template)) is available as a demo.
## Usage
The `mkdocs.yml` in the root directory will be used by default.
```yaml
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: writejobs:
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
with:
requirements_file: requirements.txt
```If you have multiple config files to handle multi-languages, you can provide `config_files`:
```yaml
uses: Kjuly/mkdocs-page-publisher@main
with:
requirements_file: requirements.txt
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][mkdocs-page-builder].
[mkdocs-page-builder]: https://github.com/Kjuly/mkdocs-page-builder