-
Notifications
You must be signed in to change notification settings - Fork 34
76 lines (66 loc) · 2.5 KB
/
deploy_documentation.yaml
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: Deploy Documentation
on: [push, pull_request, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
steps:
- uses: actions/checkout@v4 # get the develop branch
with:
ref: 'refs/heads/develop'
- uses: actions/checkout@v4
- name: Set up Python 3.7
uses: actions/setup-python@v5
with:
python-version: 3.7
- name: Cache pip
uses: actions/cache@v4
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('NuRadioMC/test/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install dependencies
run: |
sudo apt-get install libgsl-dev
python -m pip install --upgrade pip
pip install flake8 pytest
export GSLDIR=$(gsl-config --prefix)
python install_dev.py --install --dev documentation proposal --no-interactive
export PYTHONPATH=$PWD:$PYTHONPATH
echo $PYTHONPATH
NuRadioMC/SignalProp/install.sh
- name: Debugging
run: |
echo checking git status...
git status
echo show last 3 commits
git log -n 3
echo show list of files modified wrt develop
git diff origin/develop --name-only
echo checking PYTHONPATH
echo $PYTHONPATH
echo checking current directory
echo $(pwd)
echo checking NuRadioReco folder structure
echo $(ls NuRadioReco)
echo checking NuRadioMC folder structure
echo $(ls NuRadioMC)
- name: Build Documentation
run: |
export PYTHONPATH=$(pwd):$PYTHONPATH
cd documentation/
python make_docs.py --debug
- name: No Jekyll
if: ${{ github.ref == 'refs/heads/develop'}}
run: |
touch documentation/build/html/.nojekyll
- name: Deploy 🚀
if: ${{ github.ref == 'refs/heads/develop'}} # only runs if the push is to develop
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages # The branch the action should deploy to.
folder: documentation/build/html # The folder the action should deploy.