docs: Configure GitHub Pages deployment with custom domain

This commit is contained in:
Benoit Chesneau 2026-01-22 22:30:37 +01:00
parent e9bc51cce4
commit 0b961036b7
2 changed files with 33 additions and 3 deletions

View File

@ -2,18 +2,23 @@ name: Docs
on: on:
push: push:
branches: [ main ] branches: [ master ]
paths: paths:
- 'docs/**' - 'docs/**'
- 'mkdocs.yml' - 'mkdocs.yml'
- 'scripts/build_settings_doc.py'
- 'gunicorn/config.py'
- 'requirements_dev.txt' - 'requirements_dev.txt'
- '.github/workflows/docs.yml' - '.github/workflows/docs.yml'
pull_request: pull_request:
paths: paths:
- 'docs/**' - 'docs/**'
- 'mkdocs.yml' - 'mkdocs.yml'
- 'scripts/build_settings_doc.py'
- 'gunicorn/config.py'
- 'requirements_dev.txt' - 'requirements_dev.txt'
- '.github/workflows/docs.yml' - '.github/workflows/docs.yml'
workflow_dispatch:
jobs: jobs:
build: build:
@ -29,6 +34,7 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install -e .
pip install -r requirements_dev.txt pip install -r requirements_dev.txt
- name: Build documentation - name: Build documentation
@ -42,7 +48,7 @@ jobs:
retention-days: 7 retention-days: 7
deploy: deploy:
if: github.event_name == 'push' && github.ref == 'refs/heads/main' if: github.event_name == 'push' && github.ref == 'refs/heads/master'
needs: build needs: build
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
@ -58,6 +64,7 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install -e .
pip install -r requirements_dev.txt pip install -r requirements_dev.txt
- name: Build documentation - name: Build documentation
@ -69,4 +76,5 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }} github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: site publish_dir: site
publish_branch: gh-pages publish_branch: gh-pages
commit_message: "docs: deploy {sha}" cname: gunicorn.org
commit_message: "docs: deploy ${{ github.sha }}"

22
docs/content/404.md Normal file
View File

@ -0,0 +1,22 @@
# Page Not Found
The page you're looking for doesn't exist or has moved.
<div class="quick-links" style="margin-top: 2rem;">
<a href="/" class="quick-link">
<strong>Home</strong>
<span>Return to the homepage</span>
</a>
<a href="/quickstart/" class="quick-link">
<strong>Quickstart</strong>
<span>Get started with Gunicorn</span>
</a>
<a href="/reference/settings/" class="quick-link">
<strong>Settings</strong>
<span>Configuration reference</span>
</a>
<a href="https://github.com/benoitc/gunicorn/issues" class="quick-link">
<strong>Report Issue</strong>
<span>Let us know about broken links</span>
</a>
</div>