-
Notifications
You must be signed in to change notification settings - Fork 49
91 lines (75 loc) · 2.88 KB
/
deploy_docu_dev.yml
File metadata and controls
91 lines (75 loc) · 2.88 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Workflow based on https://github.com/actions/starter-workflows/blob/main/ci/python-package.yml
name: Deploy Docu (dev)
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-22.04
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Check out the repo containing the docu source
uses: actions/checkout@v4
- name: Check out the repo containing the python pkg DoubleML (dev)
uses: actions/checkout@v4
with:
repository: DoubleML/doubleml-for-py
path: doubleml-for-py
- name: Install graphviz
run: sudo apt-get install graphviz
- name: Install python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies and the python package
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip uninstall -y DoubleML
cd doubleml-for-py
pip install -e .[rdd]
- name: Add R repository
run: |
sudo apt install dirmngr gnupg apt-transport-https ca-certificates software-properties-common
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/'
- name: Install R
run: |
sudo apt-get update
sudo apt-get install r-base
sudo apt-get install r-base-dev
sudo apt-get install -y zlib1g-dev libicu-dev pandoc make libcurl4-openssl-dev libssl-dev
- name: Get user library folder
run: |
mkdir ${GITHUB_WORKSPACE}/tmp_r_libs_user
echo R_LIBS_USER=${GITHUB_WORKSPACE}/tmp_r_libs_user >> $GITHUB_ENV
- name: Query R version
run: |
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}
- name: Cache R packages
uses: actions/cache@v4
with:
path: ${{ env.R_LIBS_USER }}
key: doubleml-user-guide-dev-${{ hashFiles('.github/R-version') }}
- name: Install R kernel for Jupyter and the R package DoubleML (dev)
run: |
install.packages('remotes')
remotes::install_github('DoubleML/doubleml-for-r', dependencies = TRUE)
install.packages(c('ggplot2', 'IRkernel', 'xgboost', 'hdm', 'reshape2', 'gridExtra', "igraph", "mlr3filters", "mlr3measures", "did"))
IRkernel::installspec()
shell: Rscript {0}
- name: Build docu with sphinx
run: |
make -C doc html
- name: Deploy to dev
uses: JamesIves/github-pages-deploy-action@v4
with:
repository-name: DoubleML/doubleml.github.io
branch: main
folder: doc/_build/html
target-folder: dev
git-config-name: DoubleML Deploy Bot
git-config-email: DoubleML@users.noreply.github.com
clean: true
ssh-key: ${{ secrets.DEPLOY_KEY }}