|
| 1 | +--- |
| 2 | +id: rw_docusaurus_operations |
| 3 | +title: Docusaurus Operations Workflow |
| 4 | +sidebar_position: 18 |
| 5 | +--- |
| 6 | + |
| 7 | +# Docusaurus Operations Workflow |
| 8 | + |
| 9 | +[](https://github.com/Chisanan232/GitHub-Action_Reusable_Workflows-Python/blob/master/.github/workflows/rw_docusaurus_operations.yaml) |
| 10 | + |
| 11 | +Build and deploy documentation using Docusaurus or other documentation frameworks. |
| 12 | + |
| 13 | +## Overview |
| 14 | + |
| 15 | +This workflow handles documentation building, versioning, and deployment operations for Docusaurus-based documentation sites. |
| 16 | + |
| 17 | +## When to Use |
| 18 | + |
| 19 | +- β
You use Docusaurus for documentation |
| 20 | +- β
You need automated documentation deployment |
| 21 | +- β
You want documentation versioning |
| 22 | +- β
You need to build documentation on CI |
| 23 | + |
| 24 | +## Inputs |
| 25 | + |
| 26 | +| Input | Type | Default | Description | |
| 27 | +|-------|------|---------|-------------| |
| 28 | +| `operation` | string | `'build'` | Operation (build, deploy, version) | |
| 29 | +| `docs_path` | string | `'docs'` | Path to documentation directory | |
| 30 | +| `node_version` | string | `'22'` | Node.js version | |
| 31 | +| `version_name` | string | `''` | Version name for versioning | |
| 32 | + |
| 33 | +## Usage Examples |
| 34 | + |
| 35 | +### Build Documentation |
| 36 | + |
| 37 | +```yaml |
| 38 | +jobs: |
| 39 | + docs: |
| 40 | + uses: Chisanan232/GitHub-Action_Reusable_Workflows-Python/.github/workflows/rw_docusaurus_operations.yaml@master |
| 41 | + with: |
| 42 | + operation: build |
| 43 | + docs_path: docs |
| 44 | +``` |
| 45 | +
|
| 46 | +### Deploy to GitHub Pages |
| 47 | +
|
| 48 | +```yaml |
| 49 | +jobs: |
| 50 | + docs: |
| 51 | + uses: Chisanan232/GitHub-Action_Reusable_Workflows-Python/.github/workflows/rw_docusaurus_operations.yaml@master |
| 52 | + with: |
| 53 | + operation: deploy |
| 54 | + docs_path: docs |
| 55 | +``` |
| 56 | +
|
| 57 | +### Version Documentation |
| 58 | +
|
| 59 | +```yaml |
| 60 | +jobs: |
| 61 | + docs: |
| 62 | + uses: Chisanan232/GitHub-Action_Reusable_Workflows-Python/.github/workflows/rw_docusaurus_operations.yaml@master |
| 63 | + with: |
| 64 | + operation: version |
| 65 | + version_name: '1.0.0' |
| 66 | +``` |
| 67 | +
|
| 68 | +## Related Workflows |
| 69 | +
|
| 70 | +- [rw_documentation_deployment](rw_documentation_deployment.mdx) - Deploy documentation |
| 71 | +- [Documentation Pipeline](/dev/next/ci-cd/documentation-deployment) - Complete pipeline |
0 commit comments