-
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
96 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: Generate docs | ||
concurrency: | ||
group: generate_docs | ||
cancel-in-progress: true | ||
|
||
on: | ||
# push: | ||
# branches: | ||
# - main | ||
workflow_dispatch: {} | ||
|
||
jobs: | ||
build-docs: | ||
name: Build docs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python for Poetry | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- name: Install poetry | ||
run: | | ||
python -m pip install poetry pip | ||
poetry config virtualenvs.create false | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
cache: "poetry" | ||
- name: Install dependencies | ||
run: | | ||
poetry install -n | ||
python -m pip install -U handsdown | ||
python -m pip install -r requirements.mkdocs.txt | ||
- name: Build docs | ||
run: | | ||
python -m handsdown --external `git config --get remote.origin.url` -o docsmd --cleanup --theme material --branch main $@ | ||
rm -rf docs/* | ||
python -m mkdocs build | ||
- name: Checkout gh-pages branch | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: gh-pages | ||
path: ./gh-pages | ||
- name: Commit changes | ||
run: | | ||
cd ./gh-pages | ||
git config --global user.email "github-actions" | ||
git config --global user.name "github-actions@github.com" | ||
rm -rf docs docsmd | ||
mv ../docs . | ||
mv ../docsmd . | ||
git commit -am "Update docs" | ||
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,7 @@ mkdocs: | |
|
||
# Build all formats | ||
formats: all | ||
|
||
python: | ||
install: | ||
- requirements: requirements.mkdocs.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,40 @@ | ||
site_name: "Mypy Boto3 Builder" | ||
repo_url: "https://github.com/youtype/mypy_boto3_builder/" | ||
site_dir: "site" | ||
docs_dir: "docs" | ||
site_dir: "docs" | ||
docs_dir: "docsmd" | ||
|
||
theme: | ||
name: readthedocs | ||
name: material | ||
icon: | ||
logo: material/file-check-outline | ||
include_sidebar: true | ||
palette: | ||
- scheme: default | ||
toggle: | ||
icon: material/toggle-switch-off-outline | ||
name: Switch to dark mode | ||
- scheme: slate | ||
primary: blue | ||
accent: blue | ||
toggle: | ||
icon: material/toggle-switch | ||
name: Switch to light mode | ||
features: | ||
- navigation.expand | ||
- navigation.instant | ||
- navigation.tracking | ||
- content.code.annotate | ||
markdown_extensions: | ||
- admonition | ||
- pymdownx.details | ||
- pymdownx.tabbed: | ||
alternate_style: true | ||
- pymdownx.highlight: | ||
use_pygments: true | ||
anchor_linenums: true | ||
- pymdownx.inlinehilite | ||
- pymdownx.snippets | ||
- pymdownx.superfences | ||
- pymdownx.emoji: | ||
emoji_index: !!python/name:materialx.emoji.twemoji | ||
emoji_generator: !!python/name:materialx.emoji.to_svg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
mkdocs | ||
mkdocs-material |