-
Notifications
You must be signed in to change notification settings - Fork 54
45 lines (37 loc) · 1.24 KB
/
build_docs.yml
File metadata and controls
45 lines (37 loc) · 1.24 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
name: Build, zip and upload documentation for release
on:
release:
types:
- created
- edited
workflow_dispatch: # This allows manual triggering
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8 # Replace with your desired Python version
- name: Install dependencies
run: |
cd docs/sphinx/
pip install -r source/requirements.txt # Replace with your project's requirements file
- name: Build Sphinx documentation
run: |
mkdir build/
sphinx-build -b html -a -E source/ build/ # Replace with your documentation source and build directories
- name: Zip Documentation
run: |
# Create a zip file of the documentation
cd build/
zip -r SofaPython3_${{ steps.branch_name.outputs.branch_name }}_docs.zip .
- name: Upload to GitHub Release
uses: softprops/action-gh-release@v1
with:
files: |
SofaPython3_${{ steps.branch_name.outputs.branch_name }}_docs.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}