File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change 4
4
push :
5
5
branches :
6
6
- main
7
+ - v*
7
8
8
9
jobs :
9
10
build-book :
76
77
run : cd website && make
77
78
78
79
- name : Deploy website index
80
+ if : github.ref == 'refs/heads/main'
79
81
uses : JamesIves/github-pages-deploy-action@v4.6.1
80
82
with :
81
83
folder : website
95
97
# run: cd source && ninja python-book-pdf
96
98
97
99
- name : Deploy Python book
100
+ if : github.ref == 'refs/heads/main'
98
101
uses : JamesIves/github-pages-deploy-action@v4.6.1
99
102
with :
100
103
folder : python-book
@@ -113,10 +116,30 @@ jobs:
113
116
# run: cd source && ninja python-book-pdf
114
117
115
118
- name : Deploy R book
119
+ if : github.ref == 'refs/heads/main'
116
120
uses : JamesIves/github-pages-deploy-action@v4.6.1
117
121
with :
118
122
folder : r-book
119
123
repository-name : resampling-stats/r-book
120
124
branch : main
121
125
single-commit : true
122
126
token : ${{ secrets.BOOK_UPLOAD_TOKEN }}
127
+
128
+ # If we're building a set edition, such as v3, push all into
129
+ # same repo
130
+
131
+ - name : Setup book edition for deployment
132
+ if : startsWith(github.ref, 'refs/heads/v')
133
+ run : |
134
+ cp -r r-book website
135
+ cp -r python-book website
136
+
137
+ - name : Deploy book edition
138
+ if : startsWith(github.ref, 'refs/heads/v')
139
+ uses : JamesIves/github-pages-deploy-action@v4.6.1
140
+ with :
141
+ folder : website
142
+ repository-name : " resampling-stats/${{ github.ref_name }}"
143
+ branch : main
144
+ single-commit : true
145
+ token : ${{ secrets.BOOK_UPLOAD_TOKEN }}
You can’t perform that action at this time.
0 commit comments