Skip to content

Commit

Permalink
Draft idea for building edition websites
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanv committed Aug 15, 2024
1 parent bceadf0 commit 55ed75b
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- v*

jobs:
build-book:
Expand Down Expand Up @@ -76,6 +77,7 @@ jobs:
run: cd website && make

- name: Deploy website index
if: github.ref == 'refs/heads/main'
uses: JamesIves/[email protected]
with:
folder: website
Expand All @@ -95,6 +97,7 @@ jobs:
# run: cd source && ninja python-book-pdf

- name: Deploy Python book
if: github.ref == 'refs/heads/main'
uses: JamesIves/[email protected]
with:
folder: python-book
Expand All @@ -113,10 +116,30 @@ jobs:
# run: cd source && ninja python-book-pdf

- name: Deploy R book
if: github.ref == 'refs/heads/main'
uses: JamesIves/[email protected]
with:
folder: r-book
repository-name: resampling-stats/r-book
branch: main
single-commit: true
token: ${{ secrets.BOOK_UPLOAD_TOKEN }}

# If we're building a set edition, such as v3, push all into
# same repo

- name: Setup book edition for deployment
if: startsWith(github.ref, 'refs/heads/v')
run: |
cp -r r-book website
cp -r python-book website
- name: Deploy book edition
if: startsWith(github.ref, 'refs/heads/v')
uses: JamesIves/[email protected]
with:
folder: website
repository-name: "resampling-stats/${{ github.ref_name }}"
branch: main
single-commit: true
token: ${{ secrets.BOOK_UPLOAD_TOKEN }}

0 comments on commit 55ed75b

Please sign in to comment.