-
Notifications
You must be signed in to change notification settings - Fork 5
68 lines (65 loc) · 2.02 KB
/
CI.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Python test
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: mypackage
environment-file: environment.yml
auto-activate-base: false
- run: |
conda info
conda list
- name: Install Doxygen
run: sudo apt-get install doxygen -y
shell: bash
- name: Install package
run: |
python3 -m pip install --upgrade pip
python3 -m pip install .
python3 -m pip install -U sphinx
python3 -m pip install -U numpy
python3 -m pip install -U furo
python3 -m pip install -U sphinx_copybutton
python3 -m pip install -U sphinxcontrib-bibtex
python3 -m pip install -U breathe
- name: Test with pytest
run: pytest .
- name: Generate Doxygen Documentation
run: cd docs &&
mkdir build &&
mkdir build/doxygen &&
doxygen doxygen/doxygen.dox
shell: bash
- name: Build docs
run: |
cd docs && make html
- name: Archive build artifacts (i.e. documentation)
uses: actions/upload-artifact@v3
with:
name: html-docs
path: docs/build/html/
publish:
needs: build
# Only publish documentation when merging into `origin/main`.`
if: "github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'yoctoyotta1024'"
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Download build artifacts (i.e. documentation)
uses: actions/download-artifact@v3
with:
name: html-docs
path: docs/build/html/
- name: Publish docs on github pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build/html