Skip to content

Commit

Permalink
Publish documentation on tag push (#330)
Browse files Browse the repository at this point in the history
* Publish documentation on tag

* More meaningful name

* Add check

* Run mkdocs with uv
  • Loading branch information
Kludex authored Sep 20, 2024
1 parent d8455d1 commit 93baf9c
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 28 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Deploy Documentation

on:
push:
tags:
- "**"

permissions:
contents: write

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- name: Install uv
uses: astral-sh/setup-uv@v2
with:
version: "0.4.12"
enable-cache: true

- name: Set up Python
run: uv python install 3.12

- name: Install dependencies
run: uv sync --frozen

- run: uv run mkdocs gh-deploy --force
11 changes: 11 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,14 @@ jobs:

- name: Run linters
run: scripts/lint

# https://github.com/marketplace/actions/alls-green#why used for branch protection checks
check:
if: always()
needs: [test]
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ The issue [tracker](https://github.com/jordaneremieff/mangum/issues) can be used

Here are a few things you might consider before opening a new issue:

- Is this covered in the [documentation](https://mangum.io/)?
- Is this covered in the [documentation](https://mangum.fastapiexpert.com/)?

- Is there already a related issue in the [tracker](https://github.com/jordaneremieff/mangum/issues)?
- Is there already a related issue in the [tracker](https://github.com/Kludex/mangum/issues)?

- Is this a problem related to Mangum itself or a third-party dependency?

Expand Down
31 changes: 17 additions & 14 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,21 @@ Hello. Contributions to this project are highly encouraged and appreciated. This

## Contents

- [Creating a pull request](#creating-a-pull-request)
* [Setting up the repository](#setting-up-the-repository)
- [Developing the project locally](#developing-the-project-locally)
* [Setup](#setup)
* [Test](#test)
+ [Coverage requirements](#coverage-requirements)
* [Lint](#lint)
+ [Code style and formatting](#code-style-and-formatting)
+ [Static type checking](#static-type-checking)
- [Using the issue tracker](#using-the-issue-tracker)
* [Technical support](#technical-support)
* [Feature requests](#feature-requests)
- [Contributing to Mangum](#contributing-to-mangum)
- [Contents](#contents)
- [Creating a pull request](#creating-a-pull-request)
- [Setting up the repository](#setting-up-the-repository)
- [Developing the project locally](#developing-the-project-locally)
- [Setup](#setup)
- [Test](#test)
- [Coverage requirements](#coverage-requirements)
- [Lint](#lint)
- [Code style and formatting](#code-style-and-formatting)
- [Static type checking](#static-type-checking)
- [Using the issue tracker](#using-the-issue-tracker)
- [Technical support](#technical-support)
- [Feature requests](#feature-requests)
- [Thank you](#thank-you)

## Creating a pull request

Expand Down Expand Up @@ -103,9 +106,9 @@ The issue [tracker](https://github.com/jordaneremieff/mangum/issues) can be used

Here are a few things you might consider before opening a new issue:

- Is this covered in the [documentation](https://mangum.io/)?
- Is this covered in the [documentation](https://mangum.fastapiexpert.com/)?

- Is there already a related issue in the [tracker](https://github.com/jordaneremieff/mangum/issues)?
- Is there already a related issue in the [tracker](https://github.com/Kludex/mangum/issues)?

- Is this a problem related to Mangum itself or a third-party dependency?

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

Mangum is an adapter for running [ASGI](https://asgi.readthedocs.io/en/latest/) applications in AWS Lambda to handle Function URL, API Gateway, ALB, and Lambda@Edge events.

***Documentation***: https://mangum.io/
***Documentation***: https://mangum.fastapiexpert.com/

## Features

Expand Down
22 changes: 11 additions & 11 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
site_name: Mangum
site_description: AWS Lambda & API Gateway support for ASGI
site_url: http://mangum.io/
site_url: http://mangum.fastapiexpert.com

theme:
name: "material"
palette:
primary: "brown"
accent: "orange"

repo_name: jordaneremieff/mangum
repo_url: https://github.com/jordaneremieff/mangum
edit_uri: ""
repo_name: Kludex/mangum
repo_url: https://github.com/Kludex/mangum
edit_uri: edit/main/docs/

nav:
- Introduction: "index.md"
- Adapter: "adapter.md"
- HTTP: "http.md"
- Lifespan: "lifespan.md"
- ASGI Frameworks: "asgi-frameworks.md"
- External Links: "external-links.md"
- Contributing: "contributing.md"
- Introduction: index.md
- Adapter: adapter.md
- HTTP: http.md
- Lifespan: lifespan.md
- ASGI Frameworks: asgi-frameworks.md
- External Links: external-links.md
- Contributing: contributing.md

markdown_extensions:
- mkautodoc
Expand Down

0 comments on commit 93baf9c

Please sign in to comment.