-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (32 loc) · 1.12 KB
/
blank.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
name: Deploy Documentation to GitHub Pages
on:
push:
branches: [2.x] # Assuming 2.x is your main branch
pull_request:
branches: [2.x]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.11" # Specify the Python version you need
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build HTML Documentation
run: make html-prod
- name: Deploy to GitHub Pages
if: github.event_name == 'push' && github.ref == 'refs/heads/2.x'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GH }}
publish_dir: ./build/html # Adjust this to your Sphinx build output directory
force_orphan: true
user_name: "github-actions[bot]"
user_email: "github-actions[bot]@users.noreply.github.com"
commit_message: "Deploy documentation to GitHub Pages"