-
Notifications
You must be signed in to change notification settings - Fork 14
40 lines (32 loc) · 1.02 KB
/
docs.yml
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
name: Build and Push Docs
on:
workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12' # Replace with the desired Python version
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Build the documentation
run: |
cd docs-source
make githubclean # Clean any old builds
make github # Build docs
- name: Deploy docs to the repository
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "github-actions@github.com"
# Assuming the built docs are in the /docs directory
git add docs
git commit -m "Automatic Deploy documentation"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # GitHub provides this token for auth