Skip to content

Commit

Permalink
[CI] Move build and deploy to GitHub Actions (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasGensollen authored Jun 4, 2024
1 parent 95897d9 commit d27aaf8
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 94 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
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'

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
- name: Build documentation
run: |
source ~/miniconda3/etc/profile.d/conda.sh
conda env update -n clinicadl_handbook -f environment.yml
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/
87 changes: 0 additions & 87 deletions .jenkins/Jenkinsfile

This file was deleted.

9 changes: 2 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,13 @@ help: Makefile
@echo "Commands to use ClinicaDL Makefile:"
@sed -n 's/^##//p' $<

## env : Bootstrap an environment
.PHONY: env
env: env.dev

## env.conda : Create a Conda environment
.PHONY: env.conda
env.conda:
@$(CONDA) env create -f environment.yml -p $(CONDA_ENV)

## env.dev : Install with Poetry
.PHONY: env.dev
env.dev:
.PHONY: install
install:
@$(POETRY) install

## build.notebooks : Build notebooks from source using jupytext
Expand Down

0 comments on commit d27aaf8

Please sign in to comment.