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

Add scaffolding of /docs directory and workflow to deploy #7303

Merged
merged 7 commits into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
Changes from 4 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
41 changes: 41 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: deploy-gh-pages

# From https://github.com/rust-lang/mdBook/wiki/Automated-Deployment%3A-GitHub-Actions#GitHub-Pages-Deploy

on:
push:
branches:
- main
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-24.04
permissions:
contents: write # To push a branch
pages: write # To push to a GitHub Pages site
id-token: write # To update the deployment status
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup mdBook
uses: jontze/action-mdbook@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
use-linkcheck: true
use-mermaid: true
use-toc: true
- run: mdbook build
working-directory: docs
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'docs/book'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
20 changes: 6 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
<p align="center">
<img width="640px" src="https://wazuh.com/uploads/2022/05/Logo-blogpost.png"/>
</p>
<p align="center">
<a href="https://wazuh.com/community/join-us-on-slack">
<img src="https://img.shields.io/badge/slack-join-blue.svg" />
</a>
<a href="https://groups.google.com/forum/#!forum/wazuh">
<img src="https://img.shields.io/badge/email-join-blue.svg" />
</a>
<a href="https://documentation.wazuh.com">
<img src="https://img.shields.io/badge/docs-view-green.svg" />
</a>
<a href="https://wazuh.com">
<img src="https://img.shields.io/badge/web-view-green.svg" />
</a>
</p>

[![Slack](https://img.shields.io/badge/slack-join-blue.svg)](https://wazuh.com/community/join-us-on-slack/)
[![Forum](https://img.shields.io/badge/chat-on%20forums-blue)](https://groups.google.com/forum/#!forum/wazuh)
[![Documentation](https://img.shields.io/badge/docs-view-green.svg)](https://documentation.wazuh.com)
[![Web](https://img.shields.io/badge/web-view-green.svg)](https://wazuh.com)
[![GH Pages](https://github.com/wazuh/wazuh-dashboard-plugins/actions/workflows/deploy-docs.yml/badge.svg)](https://github.com/wazuh/wazuh-dashboard-plugins/actions/workflows/deploy-docs.yml)

- [Welcome](#welcome)
- [Project resources](#project-resources)
Expand Down
1 change: 1 addition & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
book
27 changes: 27 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Wazuh Agent Technical Documentation

This folder contains the technical documentation for the Wazuh dashboard. The documentation is organized into the following guides:

- **Development Guide**: Instructions for building, testing, and packaging the agent.
- **Reference Manual**: Detailed information on the agent’s architecture, configuration, and usage.
- **Diagnostic Guide**: Steps to diagnose errors and resolve common issues.

## Requirements

To work with this documentation, you need **mdBook** installed. For installation instructions, refer to the [mdBook documentation](https://rust-lang.github.io/mdBook/).

## Usage

- To build the documentation, run:

```bash
./build.sh
```

The output will be generated in the `book` directory.

- To serve the documentation locally for preview, run:
```bash
./server.sh
```
The documentation will be available at [http://127.0.0.1:3000](http://127.0.0.1:3000).
36 changes: 36 additions & 0 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Summary

- [Introduction](README.md)

# Development Documentation

- [Introduction](dev/README.md)
- [Setup Environment](dev/setup.md)
- [Build Packages](dev/build-packages.md)
- [Build Image](dev/build-image.md)
- [Build from Sources](dev/build-sources.md)
- [Run from Sources](dev/run-sources.md)
- [Run Tests](dev/run-tests.md)

# Reference Manual

- [Introduction](ref/README.md)
- [Description](ref/description.md)
- [Architecture](ref/architecture.md)
- [Compatibility](ref/compatibility.md)
- [Getting Started](ref/getting-started/README.md)
- [Requirements](ref/getting-started/requirements.md)
- [Packages](ref/getting-started/packages.md)
- [Installation](ref/getting-started/installation.md)
- [Configuration](ref/configuration.md)
- [Modules](ref/modules/README.md)
- [Upgrade](ref/upgrade.md)
- [Uninstall](ref/uninstall.md)
- [Back Up and Restore](ref/backup-restore.md)
- [Security](ref/security.md)
- [Performance](ref/performance.md)
- [Glossary](ref/glossary.md)

# Diagnostic Documentation

- [Diagnostic Guide](diag/diagnostic.md)
7 changes: 7 additions & 0 deletions docs/book.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[book]
title = "Wazuh dashboard documentation"
authors = ["Wazuh dashboard Team"]
description = "The technical documentation for the Wazuh dashboard, composed by the development documentation and the reference manual."
language = "en"
multilingual = false
src = "."
3 changes: 3 additions & 0 deletions docs/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#! /bin/sh

mdbook build
File renamed without changes.
1 change: 1 addition & 0 deletions docs/dev/build-image.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# How to generate a container image
1 change: 1 addition & 0 deletions docs/dev/build-packages.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# How to generate a package
1 change: 1 addition & 0 deletions docs/dev/build-sources.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# How to build from sources
1 change: 1 addition & 0 deletions docs/dev/run-sources.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# How to run from sources
1 change: 1 addition & 0 deletions docs/dev/run-tests.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# How to run the tests
5 changes: 5 additions & 0 deletions docs/dev/setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Setup the development environment

## Setup the toolchain

## Setup the editor/debugger
1 change: 1 addition & 0 deletions docs/diag/diagnostic.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Diagnostic Guide
1 change: 1 addition & 0 deletions docs/ref/architecture.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Architecture
1 change: 1 addition & 0 deletions docs/ref/backup-restore.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Backup and restore
1 change: 1 addition & 0 deletions docs/ref/compatibility.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Compatibility
1 change: 1 addition & 0 deletions docs/ref/configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Configuration
1 change: 1 addition & 0 deletions docs/ref/description.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Description
1 change: 1 addition & 0 deletions docs/ref/getting-started/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Installation
1 change: 1 addition & 0 deletions docs/ref/getting-started/packages.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Packages
1 change: 1 addition & 0 deletions docs/ref/getting-started/requirements.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Requirements
1 change: 1 addition & 0 deletions docs/ref/glossary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Glossary
1 change: 1 addition & 0 deletions docs/ref/modules/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Modules
1 change: 1 addition & 0 deletions docs/ref/performance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Performance
1 change: 1 addition & 0 deletions docs/ref/security.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Security
1 change: 1 addition & 0 deletions docs/ref/uninstall.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Uninstall
1 change: 1 addition & 0 deletions docs/ref/upgrade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Upgrade
3 changes: 3 additions & 0 deletions docs/serve.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#! /bin/sh

mdbook serve --open
Loading