File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 push :
55 branches :
66 - main
7+ - v*
78
89jobs :
910 build-book :
7677 run : cd website && make
7778
7879 - name : Deploy website index
80+ if : github.ref == 'refs/heads/main'
7981 uses : JamesIves/github-pages-deploy-action@v4.6.1
8082 with :
8183 folder : website
9597 # run: cd source && ninja python-book-pdf
9698
9799 - name : Deploy Python book
100+ if : github.ref == 'refs/heads/main'
98101 uses : JamesIves/github-pages-deploy-action@v4.6.1
99102 with :
100103 folder : python-book
@@ -113,10 +116,30 @@ jobs:
113116 # run: cd source && ninja python-book-pdf
114117
115118 - name : Deploy R book
119+ if : github.ref == 'refs/heads/main'
116120 uses : JamesIves/github-pages-deploy-action@v4.6.1
117121 with :
118122 folder : r-book
119123 repository-name : resampling-stats/r-book
120124 branch : main
121125 single-commit : true
122126 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