-
Notifications
You must be signed in to change notification settings - Fork 7
55 lines (49 loc) · 1.65 KB
/
build_and_deploy.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
name: Build and Deloy Handbook
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
permissions:
contents: read
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
env:
POETRY_VERSION: '1.6.1'
PYTHON_VERSION: '3.10'
CACHE_NUMBER: 0 # increase to reset cache manually
jobs:
build-and-deploy:
runs-on:
- self-hosted
- Linux
- gpu
steps:
- uses: actions/checkout@v4
- uses: snok/install-poetry@v1
with:
version: ${{ env.POETRY_VERSION }}
virtualenvs-create: false
- uses: actions/cache@v2
with:
path: /local2/ci/miniconda3/envs/clinicadl_handbook
key: ${{ env.CACHE_NUMBER }}-conda-${{ hashFiles('environment.yml') }}
id: cache
- name: Update environment
run: |
source ~/miniconda3/etc/profile.d/conda.sh
conda env update -n clinicadl_handbook -f environment.yml
if: steps.cache.outputs.cache-hits != 'true'
- name: Build documentation
run: |
source ~/miniconda3/etc/profile.d/conda.sh
conda activate clinicadl_handbook
make install
make build.notebooks
make build.book
sed -i 's+github/aramis-lab/clinicadl_handbook/blob/main/jupyter-book/notebooks+github/aramis-lab/clinicadl_handbook/blob/main/notebooks+g' ./jupyter-book/_build/html/notebooks/*.html
- name: Deploy documentation
run: |
ls jupyter-book/_build/html
scp -r jupyter-book/_build/html aramislab:/srv/local/clinicadl/tutoriel/2023/