Skip to content
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
44 changes: 42 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,52 @@
version: 2

multi-ecosystem-groups:
infrastructure:
schedule:
interval: "weekly"
day: "wednesday"
open-pull-requests-limit: 25
commit-message:
prefix: "chore"
include: "scope"

updates:
- package-ecosystem: "nuget"
directory: "/"
schedule:
interval: "weekly"
day: "wednesday"
open-pull-requests-limit: 25
cooldown:
default-days: 7
commit-message:
prefix: "chore"
include: "scope"
groups:
dotnet:
dotnet-minor-patch:
update-types:
- "minor"
- "patch"
patterns:
- "*"
- "*"
dotnet-major:
update-types:
- "major"
patterns:
- "*"

- package-ecosystem: "github-actions"
directory: "/"
patterns:
- "*"
multi-ecosystem-group: "infrastructure"
cooldown:
default-days: 7

- package-ecosystem: "uv"
directory: "/"
patterns:
- "*"
multi-ecosystem-group: "infrastructure"
cooldown:
default-days: 7
34 changes: 34 additions & 0 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Dependabot auto-merge

on:
pull_request_target:
types: [opened, synchronize, reopened]

permissions:
contents: write
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'LayeredCraft/cdk-constructs'
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Approve PR
if: steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor'
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Enable auto-merge for Dependabot PRs
if: steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor'
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22 changes: 10 additions & 12 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ on:
paths:
- 'docs/**'
- 'mkdocs.yml'
- 'pyproject.toml'
- 'uv.lock'
Comment on lines 6 to +10
- '.github/workflows/docs.yml'
pull_request:
branches: [ main ]
paths:
- 'docs/**'
- 'mkdocs.yml'
- 'pyproject.toml'
- 'uv.lock'
- '.github/workflows/docs.yml'

permissions:
Expand All @@ -35,28 +39,22 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
python-version-file: pyproject.toml

Comment on lines 39 to 43
- name: Cache dependencies
uses: actions/cache@v4
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
key: mkdocs-material-${{ hashFiles('requirements.txt') }}
path: ~/.cache/pip
restore-keys: |
mkdocs-material-
enable-cache: true

- name: Install dependencies
run: |
pip install mkdocs-material
pip install mkdocs-minify-plugin
run: uv sync --locked

- name: Setup Pages
id: pages
uses: actions/configure-pages@v4

- name: Build documentation
run: |
mkdocs build --clean
run: uv run mkdocs build --clean

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
Expand Down
4 changes: 3 additions & 1 deletion LayeredCraft.Cdk.Constructs.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<Folder Name="/docs/">
<File Path="docs/index.md" />
<File Path="mkdocs.yml" />
<File Path="requirements.txt" />
<File Path="pyproject.toml" />
<File Path="uv.lock" />
</Folder>
<Folder Name="/docs/assets/">
<File Path="docs/assets/icon.png" />
Expand All @@ -24,6 +25,7 @@
</Folder>
<Folder Name="/git/">
<File Path=".github/dependabot.yml" />
<File Path=".github/workflows/dependabot-auto-merge.yml" />
<File Path=".github/workflows/docs.yml" />
<File Path=".github/workflows/pr-build.yaml" />
<File Path=".github/workflows/pr-title-check.yaml" />
Expand Down
10 changes: 10 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[project]
name = "layeredcraft-cdk-constructs-docs"
version = "0.0.0"
description = "Documentation build dependencies for LayeredCraft CDK Constructs."
requires-python = ">=3.12"
dependencies = [
"mkdocs>=1.5.3",
"mkdocs-material>=9.4.6",
"mkdocs-minify-plugin>=0.7.1",
]
3 changes: 0 additions & 3 deletions requirements.txt

This file was deleted.

Loading
Loading