Skip to content

Commit 847c843

Browse files
Copilotjorge07
andcommitted
Add Docusaurus documentation site with GitHub Pages deployment
Co-authored-by: jorge07 <4022187+jorge07@users.noreply.github.com>
1 parent 4e4d54f commit 847c843

46 files changed

Lines changed: 26492 additions & 1 deletion

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy-docs.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Deploy Documentation to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- 'doc/**'
9+
- 'docs-site/**'
10+
- '.github/workflows/deploy-docs.yml'
11+
workflow_dispatch:
12+
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
concurrency:
19+
group: "pages"
20+
cancel-in-progress: false
21+
22+
jobs:
23+
build:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v4
28+
29+
- name: Setup Node.js
30+
uses: actions/setup-node@v4
31+
with:
32+
node-version: '20'
33+
cache: 'npm'
34+
cache-dependency-path: docs-site/package-lock.json
35+
36+
- name: Install dependencies
37+
run: |
38+
cd docs-site
39+
npm ci
40+
41+
- name: Build documentation
42+
run: |
43+
cd docs-site
44+
npm run build
45+
46+
- name: Setup Pages
47+
uses: actions/configure-pages@v4
48+
49+
- name: Upload artifact
50+
uses: actions/upload-pages-artifact@v3
51+
with:
52+
path: docs-site/build
53+
54+
deploy:
55+
environment:
56+
name: github-pages
57+
url: ${{ steps.deployment.outputs.page_url }}
58+
runs-on: ubuntu-latest
59+
needs: build
60+
steps:
61+
- name: Deploy to GitHub Pages
62+
id: deployment
63+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,11 @@ build/
2626
/.php_cs.cache
2727
/.phpunit.result.cache
2828
###< friendsofphp/php-cs-fixer ###
29-
etc/artifact/chart/charts/
29+
etc/artifact/chart/charts/
30+
31+
###> docusaurus ###
32+
docs-site/node_modules/
33+
docs-site/build/
34+
docs-site/.docusaurus/
35+
docs-site/.cache-loader/
36+
###< docusaurus ###

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ This project showcases:
2424
2525
## Documentation
2626

27+
📖 **[View the full documentation site](https://jorge07.github.io/symfony-6-es-cqrs-boilerplate/)**
28+
29+
The documentation is also available in this repository:
30+
2731
### 📚 Core Concepts
2832

2933
**Domain-Driven Design (DDD)**

docs-site/.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

docs-site/README.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Documentation Site
2+
3+
This directory contains the Docusaurus site for the Symfony 6 ES CQRS Boilerplate documentation.
4+
5+
## Development
6+
7+
### Installation
8+
9+
```bash
10+
cd docs-site
11+
npm install
12+
```
13+
14+
### Local Development
15+
16+
```bash
17+
npm start
18+
```
19+
20+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
21+
22+
### Build
23+
24+
```bash
25+
npm run build
26+
```
27+
28+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
29+
30+
### Deployment
31+
32+
The documentation is automatically deployed to GitHub Pages when changes are pushed to the `master` branch.
33+
34+
You can also manually deploy using:
35+
36+
```bash
37+
GIT_USER=<Your GitHub username> npm run deploy
38+
```
39+
40+
## Structure
41+
42+
The documentation is organized into the following sections:
43+
44+
- **DDD** - Domain-Driven Design concepts and patterns
45+
- **CQRS** - Command Query Responsibility Segregation and Event Sourcing
46+
- **Advanced** - Advanced topics including testing and performance optimization
47+
- **Getting Started** - Quick start guides and tutorials
48+
49+
## Updating Documentation
50+
51+
1. Make changes to the markdown files in the `../doc` directory
52+
2. Run the documentation sync script to update the Docusaurus docs
53+
3. Test locally with `npm start`
54+
4. Commit and push changes - GitHub Actions will automatically deploy

0 commit comments

Comments
 (0)