Skip to content

Commit a642007

Browse files
committed
Removed all docs lang except en. Added new docs deploy flow
1 parent 6994cff commit a642007

109 files changed

Lines changed: 97 additions & 6690 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/docs-deploy.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

.github/workflows/docs.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Deploy docs
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
version:
7+
description: 'Version to deploy (e.g., v0.1.0)'
8+
required: true
9+
type: string
10+
workflow_dispatch:
11+
inputs:
12+
version:
13+
description: 'Version to deploy (e.g., v0.1.0)'
14+
required: true
15+
type: string
16+
17+
permissions:
18+
contents: write
19+
20+
jobs:
21+
deploy:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
28+
- uses: actions/setup-python@v5
29+
with:
30+
python-version: '3.12'
31+
32+
- name: Install dependencies
33+
run: pip install mkdocs-material mike
34+
35+
- name: Configure git
36+
run: |
37+
git config user.name "github-actions[bot]"
38+
git config user.email "github-actions[bot]@users.noreply.github.com"
39+
40+
- name: Extract version number
41+
id: version
42+
run: |
43+
# v0.1.0 -> 0.1
44+
VERSION="${{ inputs.version }}"
45+
VERSION="${VERSION#v}"
46+
VERSION="${VERSION%.*}"
47+
echo "short=$VERSION" >> $GITHUB_OUTPUT
48+
49+
- name: Deploy docs
50+
run: |
51+
mike deploy ${{ steps.version.outputs.short }} latest --update-aliases --push
52+
mike set-default latest --push
53+
54+
- name: Ensure CNAME exists
55+
run: |
56+
git checkout gh-pages
57+
echo "fastopenapi.fatalyst.dev" > CNAME
58+
git add CNAME
59+
git diff --cached --quiet || git commit -m "Add CNAME"
60+
git push origin gh-pages

.github/workflows/master-deploy.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,9 @@ jobs:
5555
run: |
5656
poetry build
5757
poetry publish
58+
59+
docs:
60+
needs: deploy-prod
61+
uses: ./.github/workflows/docs.yml
62+
with:
63+
version: ${{ github.ref_name }}
File renamed without changes.
Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ fastopenapi/
1616
├── quart.py
1717
├── sanic.py
1818
├── starlette.py
19-
├── tornado.py
20-
└── django.py
19+
└── tornado.py
2120
```
2221

2322
---
@@ -175,25 +174,6 @@ def status():
175174

176175
---
177176

178-
### DjangoRouter
179-
180-
Use for Django integration.
181-
182-
```python
183-
from django.urls import path
184-
from fastopenapi.routers import DjangoRouter
185-
186-
router = DjangoRouter(app=True)
187-
188-
@router.get("/status")
189-
async def status():
190-
return {"status": "ok"}
191-
192-
urlpatterns = [path("", router.urls)]
193-
```
194-
195-
---
196-
197177
### Example with Sub-router
198178

199179
```python
@@ -302,8 +282,5 @@ async def tornado_notfound():
302282
raise HTTPError(status_code=404, reason="Not Found")
303283
```
304284

305-
#### Django
306-
307-
```python
308-
from django.http import Http404
285+
---
309286

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22

33
All notable changes to FastOpenAPI will be documented in this file.
44

5-
## [0.8.0] - Unreleased
6-
7-
### Added
8-
- `DjangoRouter` for integration with the `Django` framework.
9-
10-
115
## [0.7.0] - 2025-04-27
126

137
### Changed
File renamed without changes.

docs/de/docs/advanced/advanced_usage.md

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)