-
Notifications
You must be signed in to change notification settings - Fork 2
76 lines (73 loc) · 2.3 KB
/
publish_docs.yml
File metadata and controls
76 lines (73 loc) · 2.3 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: publish docs
on:
push:
branches:
- main
- master
- dev
pull_request:
branches:
- main
- master
- dev
workflow_dispatch:
permissions:
contents: write
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up R
uses: r-lib/actions/setup-r@v2
with:
r-version: '4.4.0' # The R version to download (if necessary) and use.
- name: Install R package requirements
# libcurl is required for r curl
run: |
sudo apt install tree
tree
sudo apt install -y libcurl4-openssl-dev
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
architecture: 'x64'
- name: Install dependencies from pyproject.toml
run: |
python -m pip install --upgrade pip
pip install .[docs,testing]
pip install ruff pytest
- name: Install MS Fonts
run: |
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections
sudo apt install -y msttcorefonts
- name: Generate autoprot.conf
run: |
PATH_TO_RSCRIPT=$(which Rscript)
RFUNCTIONS=$(realpath autoprot/RFunctions.R)
echo -e "R = $PATH_TO_RSCRIPT\nRFUNCTIONS = $RFUNCTIONS" > autoprot/autoprot.conf
cat autoprot/autoprot.conf
- name: Check R install
run: |
python -c "from autoprot import r_helper; r_helper.return_r_path()"
Rscript autoprot/RFunctions.R functest
- name: Check matplotlib version
run: python -c "import matplotlib; print(matplotlib.__version__)"
- name: Sphinx build
run: |
sphinx-build docs docs/_build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
if: ${{ github.event_name == 'push' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/
force_orphan: true
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'