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
21 changes: 21 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: 2
updates:
# Monitor Docker base image
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 5
commit-message:
prefix: "chore"
include: "scope"

# Monitor Python packages
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 5
commit-message:
prefix: "chore"
include: "scope"
28 changes: 28 additions & 0 deletions .github/workflows/auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Auto-merge Dependabot PRs

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
check_suite:
types: [completed]

permissions:
contents: write
pull-requests: write
checks: read

jobs:
auto-merge:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- name: Enable auto-merge for Dependabot PRs
uses: fastify/github-action-merge-dependabot@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
target: main
merge-method: squash
merge-commit-message: pull-request-title
skip-if-mergeable: false
skip-if-checks-pending: true
skip-if-required-checks-pending: true
7 changes: 2 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@ FROM python:3.13-slim
WORKDIR /docs

# Install mkdocs and mkdocs-material
RUN pip install --no-cache-dir \
mkdocs \
mkdocs-material \
mkdocs-minify-plugin \
mkdocs-redirects
COPY requirements.txt /tmp/requirements.txt
RUN pip install --no-cache-dir -r /tmp/requirements.txt

# Expose the default mkdocs port
EXPOSE 8000
Expand Down
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,34 @@ docker run -p 8000:8000 -v $(pwd)/test:/docs mkdocs-material-image:latest

The GitHub Actions workflow builds and pushes the image to GHCR on push to main or when tags are created.

### Automated Dependency Updates

Dependabot automatically monitors and creates pull requests for:

- **Docker base image** (`python:3.13-slim`) - checks weekly for security patches and updates
- **Python packages** (`mkdocs`, `mkdocs-material`, etc.) - checks weekly for new versions

**Fully Automated Process:**

1. Dependabot creates PRs with commit messages following the conformance format (`chore(deps): ...`)
2. CI workflow validates the build
3. Commit message conformance check validates the PR
4. Auto-merge workflow automatically merges PRs that pass all checks
5. Merging triggers the build-and-release workflow to build and push the new image

No manual intervention required - the entire update process is automated.

## Project Structure

```plaintext
.
├── Dockerfile # Docker image definition
├── requirements.txt # Python package dependencies
├── .dockerignore # Files excluded from Docker build
├── .github/
│ └── workflows/
│ └── build-and-release.yml # CI/CD workflow
│ ├── workflows/
│ │ └── build-and-release.yml # CI/CD workflow
│ └── dependabot.yml # Automated dependency updates
├── .vscode/
│ ├── settings.json # VS Code settings
│ └── extensions.json # Recommended extensions
Expand Down
4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
mkdocs
mkdocs-material
mkdocs-minify-plugin
mkdocs-redirects