-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (43 loc) · 1.36 KB
/
Copy pathapi_docs.yml
File metadata and controls
52 lines (43 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: BASIC++ API Documentation & SDK Pipeline
on:
push:
branches: [ main, master ]
release:
types: [ published ]
jobs:
build-and-deploy-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Configure CMake
run: cmake -B build -DBUILD_TESTING=OFF
- name: Build baspp Binary
run: cmake --build build --target baspp --config Release
- name: Export API Schema & Documentation
run: |
./build/engine/baspp --export-docs json api_schema.json
./build/engine/baspp --export-docs markdown docs/api
./build/engine/baspp --export-docs html docs/web/api_reference.html
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs/web
branch: gh-pages
publish-packages:
needs: build-and-deploy-docs
if: github.event_name == 'release'
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Build & Publish Python Package to PyPI
run: |
cd bindings/python
python -m pip install --upgrade build twine
python -m build
# twine upload dist/*