Skip to content
Closed
Show file tree
Hide file tree
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
31 changes: 28 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ on:
push:
branches:
- develop
- v2
paths:
- 'docs/*'
- 'docs/**'
- 'mkdocs.yml'
- 'requirements-docs.txt'
- '.github/workflows/docs.yml'
workflow_dispatch:

permissions:
contents: write
Expand All @@ -16,8 +20,29 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-python@v6
with:
python-version: 3.x
- run: pip install mkdocs-material
- run: mkdocs gh-deploy --force
- run: pip install -r requirements-docs.txt
- run: git fetch origin gh-pages --depth=1
- run: git config user.name github-actions[bot]
- run: git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- name: Deploy docs with mike
env:
BRANCH_NAME: ${{ github.ref_name }}
run: |
case "$BRANCH_NAME" in
develop)
mike deploy --push --update-aliases dev latest
mike set-default --push latest
;;
v2)
mike deploy --push --update-aliases v2
;;
*)
echo "Unsupported docs branch: $BRANCH_NAME"
exit 1
;;
esac
7 changes: 7 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
site_name: CodeIgniter HTMX
site_description: Documentation for HTMX helper library for CodeIgniter 4 framework
site_url: https://michalsn.github.io/codeigniter-htmx/

theme:
name: material
Expand All @@ -25,6 +26,8 @@ theme:

extra:
homepage: https://michalsn.github.io/codeigniter-htmx
version:
provider: mike

social:
- icon: fontawesome/brands/github
Expand All @@ -39,6 +42,10 @@ markdown_extensions:
- pymdownx.highlight:
use_pygments: false

plugins:
- search
- mike

extra_css:
- assets/github-dark-dimmed.css

Expand Down
2 changes: 2 additions & 0 deletions requirements-docs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
mkdocs-material
mike
Loading