-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
61 lines (60 loc) · 1.76 KB
/
Jenkinsfile
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
#!groovy
pipeline {
agent {
label 'PACE Windows (Private)'
}
stages {
stage('Checkout') {
steps {
withCredentials([string(credentialsId: 'GitHub_API_Token',
variable: 'api_token')]) {
bat '''
git config --local user.name "PACE CI Build Agent" &
git clone https://pace-builder:%api_token%@github.com/pace-neutrons/document-test . &
'''
}
}
}
stage ('Prepare') {
steps {
bat '''
git checkout gh-pages &
git rm -rf . &
git checkout %BRANCH_NAME%
'''
}
}
stage('Build') {
steps {
bat '''
pip install sphinx &
pip install sphinx_rtd_theme &
make.bat html &
make.bat html
'''
}
}
stage('Store') {
steps {
bat '''
rmdir /S /Q ..\\stash
mkdir ..\\stash &
move docs ..\\stash
'''
}
}
stage('Deploy') {
steps {
bat '''
git checkout gh-pages &
echo "Bypassing Jekyll on GitHub Pages" > .nojekyll &
git add .nojekyll &
robocopy /E /NFL /NDL /NJS /nc /ns /np ..\\stash\\docs\\html . &
git add * &
git commit -m "Document build from CI" &
git push origin gh-pages
'''
}
}
}
}