diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index c9da2c3..c6bc90d 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -1,32 +1,49 @@
name: Deploy Documentation
on:
push:
- branches:
- - main # Set the branch you want to trigger the deployment
+ branches: [main]
+ pull_request:
+ branches: [main]
jobs:
- deploy:
+ build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v5
-
+ with:
+ persist-credentials: false
+
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
-
+
- name: Install Dependencies
- run: |
- python -m pip install --upgrade pip
- pip install nox
- nox -s docs
+ run: pipx run nox -s docs
+ - name: Upload docs build as artifact
+ uses: actions/upload-pages-artifact@v4
+ with:
+ name: ${{ github.event.repository.name }}_docs
+ path: ${{ github.workspace }}/site
+
+ deploy:
+ if: github.ref == 'refs/heads/main'
+ runs-on: ubuntu-latest
+ needs: [build]
+ permissions:
+ # to deploy to Pages
+ pages: write
+ # to verify the deployment originates from an appropriate source
+ id-token: write
+ # Deploy to the github-pages environment
+ environment:
+ name: github-pages
+ url: ${{ steps.deployment.outputs.page_url }}
+ steps:
- name: Deploy to GitHub Pages
- uses: peaceiris/actions-gh-pages@v4
+ id: deployment
+ uses: actions/deploy-pages@v4
with:
- github_token: ${{ secrets.GITHUB_TOKEN }}
- publish_dir: ./site
- user_name: 'github-actions[bot]'
- user_email: 'github-actions[bot]@users.noreply.github.com'
- commit_message: 'Deploy documentation'
+ artifact_name: ${{ github.event.repository.name }}_docs
diff --git a/docs/getting-started.md b/docs/getting-started.md
index 11c4416..fae91c6 100644
--- a/docs/getting-started.md
+++ b/docs/getting-started.md
@@ -4,11 +4,13 @@ Welcome to cpp-linter! This guide will help you integrate C/C++ linting into you
## Choose Your Integration
+
+
Select the method that best fits your development workflow:
-- :material-github: **GitHub Actions**
+- :material-github: **GitHub Actions**
---
@@ -18,8 +20,7 @@ Select the method that best fits your development workflow:
[Get started with GitHub Actions →](https://cpp-linter.github.io/cpp-linter-action/){ .md-button .md-button--primary }
-
-- :material-git: **Pre-commit Hooks**
+- :material-git: **Pre-commit Hooks**
---
@@ -28,9 +29,8 @@ Select the method that best fits your development workflow:
**Perfect for:** Catching issues before commits, local enforcement
[Get started with pre-commit →](https://github.com/cpp-linter/cpp-linter-hooks){ .md-button .md-button--primary }
-
-- :fontawesome-brands-python: **Command Line**
+- :fontawesome-brands-python: **Command Line**
---
@@ -40,7 +40,7 @@ Select the method that best fits your development workflow:
[Get started with cpp-linter package →](https://cpp-linter.github.io/cpp-linter/){ .md-button .md-button--primary }
-- :simple-rust: **Command Line (Rust)**
+- :simple-rust: **Command Line (Rust)**
---
@@ -56,7 +56,7 @@ Select the method that best fits your development workflow:
-- :fontawesome-brands-github: **clang-tools-static-binaries**
+- :fontawesome-brands-github: **clang-tools-static-binaries**
---
@@ -64,8 +64,7 @@ Select the method that best fits your development workflow:
[Download from →](https://github.com/cpp-linter/clang-tools-static-binaries){ .md-button .md-button--primary }
-
-- :fontawesome-brands-docker: **clang-tools-docker**
+- :fontawesome-brands-docker: **clang-tools-docker**
---
@@ -73,8 +72,7 @@ Select the method that best fits your development workflow:
[Download from →](https://github.com/cpp-linter/clang-tools-docker){ .md-button .md-button--primary }
-
-- :fontawesome-brands-python: **clang-tools-wheels**
+- :fontawesome-brands-python: **clang-tools-wheels**
---
@@ -84,13 +82,11 @@ Select the method that best fits your development workflow:
-
-
## Easy Installation
-- :fontawesome-brands-python: **clang-tools-pip**
+- :fontawesome-brands-python: **clang-tools-pip**
---
@@ -98,7 +94,7 @@ Select the method that best fits your development workflow:
[Get started with clang-tools CLI →](https://cpp-linter.github.io/clang-tools-pip/){ .md-button .md-button--primary }
-- :fontawesome-brands-python: **clang-tools-asdf**
+- :fontawesome-brands-python: **clang-tools-asdf**
---
diff --git a/docs/index.md b/docs/index.md
index caa8e2a..11f2840 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -2,39 +2,31 @@
hide:
- navigation
- toc
+template: home.html
+title: C/C++ Linting
---
-
+
-# C/C++ linting that simply works
-
-**Lint your C/C++ code in workflow** - automated, configurable, and reliable. Integrate seamlessly into any workflow in minutes.
-
-[Get started :material-rocket-launch:](getting-started.md){ .md-button .md-button--primary }
-
-
-
-
-
-
+# C/C++ Linting
## Everything you need for linting C/C++ code
-- :material-chart-line: **Built in Open Source**
+- :material-chart-line: **Built in Open Source**
---
Open-source and MIT-licensed. Bringing contributors together to empower impactful C/C++ lint projects in open source and beyond.
-- :material-cog: **Zero Configuration**
+- :material-cog: **Zero Configuration**
---
Works out of the box with sensible defaults. Advanced users can customize every aspect to match their coding standards.
-- :material-devices: **Works Everywhere**
+- :material-devices: **Works Everywhere**
---
@@ -138,7 +130,15 @@ hide:
- id: clang-format
args: [--style=Google] # Other coding style: LLVM, GNU, Chromium, Microsoft, Mozilla, WebKit.
- id: clang-tidy
- args: [--checks='boost-*,bugprone-*,performance-*,readability-*,portability-*,modernize-*,clang-analyzer-*,cppcoreguidelines-*']
+ args:
+ - --checks='boost-*
+ - bugprone-*
+ - performance-*
+ - readability-*
+ - portability-*
+ - modernize-*
+ - clang-analyzer-*
+ - cppcoreguidelines-*'
```
=== "Command Line"
diff --git a/docs/overrides/home.html b/docs/overrides/home.html
new file mode 100644
index 0000000..525278f
--- /dev/null
+++ b/docs/overrides/home.html
@@ -0,0 +1,20 @@
+{% extends "main.html" %}
+
+{% block hero %}
+
+
C/C++ linting that simply works
+
+ Lint your C/C++ code in your development workflow
+ - automated, configurable, and reliable.
+ Integrate seamlessly into any development workflow in minutes.
+