Skip to content

Commit f8a3e92

Browse files
authored
feat: Docs 🎉 (#174)
1 parent d73da3b commit f8a3e92

22 files changed

Lines changed: 1951 additions & 1252 deletions

.github/workflows/CI-CD.yaml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@ name: CI/CD
33

44
on:
55
push:
6-
branches: [ "main", "dev" ]
7-
# Publish semver tags as releases.
8-
tags: [ 'v*.*.*' ]
6+
branches: [ "main", "master", "dev" ]
97
pull_request:
10-
branches: ["dev"]
8+
branches: ["main", "master", "dev"]
119

1210
concurrency:
1311
group: ${{ github.workflow }}-${{ github.ref }}
@@ -25,8 +23,17 @@ jobs:
2523
id-token: write
2624
uses: ./.github/workflows/docker.yaml
2725

26+
docs:
27+
if: github.repository == 'nicebots-xyz/botkit'
28+
needs: quality
29+
permissions:
30+
contents: read
31+
pages: write
32+
id-token: write
33+
uses: ./.github/workflows/docs.yaml
34+
2835
deploy:
29-
if: github.event_name == 'push' && github.ref == 'refs/heads/dev'
36+
if: github.event_name == 'push' && github.ref_name == github.event.repository.default_branch
3037
needs: docker
3138
uses: ./.github/workflows/deploy.yaml
3239
secrets: inherit

.github/workflows/docs.yaml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Docs
2+
3+
on:
4+
workflow_call:
5+
6+
concurrency:
7+
group: docs-${{ github.workflow }}-${{ github.ref }}
8+
cancel-in-progress: true
9+
10+
jobs:
11+
build:
12+
name: Build docs
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v6
16+
17+
- name: Setup PDM
18+
uses: pdm-project/setup-pdm@v4
19+
with:
20+
cache: true
21+
python-version-file: pyproject.toml
22+
23+
- name: Install dependencies
24+
run: pdm install -d -G docs
25+
26+
- name: Build docs
27+
run: pdm run docs:build
28+
29+
- name: Upload site artifact
30+
if: github.event_name == 'push' && github.ref_name == github.event.repository.default_branch
31+
uses: actions/upload-pages-artifact@v5
32+
with:
33+
path: site
34+
35+
deploy:
36+
name: Publish docs
37+
if: github.event_name == 'push' && github.ref_name == github.event.repository.default_branch
38+
needs: build
39+
runs-on: ubuntu-latest
40+
permissions:
41+
contents: read
42+
pages: write
43+
id-token: write
44+
environment:
45+
name: github-pages
46+
url: ${{ steps.deployment.outputs.page_url }}
47+
steps:
48+
- uses: actions/configure-pages@v6
49+
50+
- name: Deploy to GitHub Pages
51+
uses: actions/deploy-pages@v5
52+
id: deployment

.github/workflows/quality.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ jobs:
4545
- name: Checkout repository
4646
uses: actions/checkout@v6
4747
- name: Setup Licensor
48-
uses: nicebots-xyz/licensor/.github/actions/setup-licensor@v0.0.5
48+
uses: nicebots-xyz/licensor/.github/actions/setup-licensor@v0.1.0
4949
with:
50-
version: v0.0.5
50+
version: v0.1.0
5151
- name: Check Header Compliance
5252
run: licensor check * --ignore ".*"

docs/api.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!--
2+
SPDX-License-Identifier: MIT
3+
Copyright: 2024-2026 NiceBots.xyz
4+
-->
5+
# API reference
6+
7+
Reference for extension loading and startup entry points.
8+
9+
## Extension loader
10+
11+
::: src.startup.loader
12+
options:
13+
members:
14+
- load_extensions
15+
- find_translation_file
16+
show_submodules: false
17+
18+
## Extension utilities
19+
20+
::: src.utils.extensions
21+
options:
22+
members:
23+
- validate_module
24+
- unzip_extensions
25+
show_submodules: false
26+
27+
## Startup orchestration
28+
29+
::: src.start
30+
options:
31+
members:
32+
- start
33+
show_submodules: false

0 commit comments

Comments
 (0)