-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (44 loc) · 1.19 KB
/
docs.yml
File metadata and controls
54 lines (44 loc) · 1.19 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
53
54
name: docs
on:
push:
branches:
- main
- final_project
pull_request:
branches:
- main
- final_project
jobs:
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Clean previous builds
run: rm -rf build dist *.egg-info
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y python3.12 python3.12-venv python3-pip git
- name: Install MPI (OpenMPI)
run: sudo apt-get update && sudo apt-get install -y libopenmpi-dev openmpi-bin
- name: Create virtual environment and install package
run: |
python3.12 -m venv venv
source venv/bin/activate
python3.12 -m pip install --upgrade pip
python3.12 -m pip install --no-cache-dir .
shell: bash -e {0}
- name: Generate documentation
run: |
source venv/bin/activate
cd docs
make html
shell: bash -e {0}
- name: Deploy
if: success()
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html
allow_empty_commit: true