Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run mkdocs build using multiple Python versions #14

Merged
merged 4 commits into from
May 7, 2024
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
32 changes: 29 additions & 3 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,53 @@
name: Deploy Demo
name: Test & Deploy
on: [push]

permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- run: curl -fsSL https://d2lang.com/install.sh | sh -s --
- name: Build docs
working-directory: ./docs
run: |
pip install ../
pip install -r requirements.txt
mkdocs build

deploy:
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/master'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: curl -fsSL https://d2lang.com/install.sh | sh -s --
- name: Build docs
working-directory: ./docs
run: |
pip install ../
pip install -r requirements.txt
mkdocs build
- uses: actions/upload-pages-artifact@v1
Expand Down
2 changes: 1 addition & 1 deletion d2/fence.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def formatter(
source: str,
language: str,
class_name: str,
options: dict[str, Any],
options: Dict[str, Any],
md: Markdown,
**kwargs: Any,
) -> str:
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
mkdocs-material
mkdocs-d2-plugin==1.3.2
mkdocs-d2-plugin
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

setup(
name="mkdocs-d2-plugin",
version="1.3.2",
version="1.3.3",
description="MkDocs plugin for D2",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down