Skip to content
Merged
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
15 changes: 8 additions & 7 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
push:
branches:
- main
- 'release/**'
paths:
- 'docs/**'
- 'mkdocs.yml'
Expand All @@ -16,9 +15,6 @@ on:
- 'SECURITY.md'
- 'noxfile.py'
- '.github/workflows/deploy-docs.yml'
# Trigger on tags regardless of paths changed
tags:
- 'v*'
pull_request:
branches:
- main
Expand Down Expand Up @@ -77,17 +73,22 @@ jobs:
cd docs/assets/brand
zip -r ../brand-kit.zip .

- name: Set docs version for topbar
run: |
VERSION=$(python3 -c "import tomllib; print('v' + tomllib.load(open('pyproject.toml','rb'))['project']['version'])")
echo "DOCS_VERSION=${VERSION}" >> "$GITHUB_ENV"

- name: Build Documentation
run: uv run mkdocs build --strict

- name: Deploy to Cloudflare Pages
# Allow deploy on push to main, workflow_dispatch, or version tags
# Production docs deploy only from main (or manual dispatch on main)
if: |
(github.event_name == 'push' || github.event_name == 'workflow_dispatch') &&
(github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
github.ref == 'refs/heads/main'
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
# Use 'main' as the production branch for Cloudflare regardless of tag name
# Deploy production docs from the merged main branch only.
command: pages deploy site --project-name=zenzic --branch=main --commit-dirty=true
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ extra_css:
extra:
build_date: !ENV [BUILD_DATE, "dev"]
generator: false
version: "0.4.0rc5"
version: !ENV [DOCS_VERSION, "dev"]
social:
- icon: fontawesome/brands/github
link: https://github.com/PythonWoods/zenzic
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ exclude_lines = [
# ─── Version bumping ───────────────────────────────────────────────────────────

[tool.bumpversion]
current_version = "0.4.0rc4"
current_version = "0.5.0a1"
commit = true
tag = true
tag_name = "v{new_version}"
Expand Down
Loading