Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft idea for building edition websites #166

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 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,32 @@ 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]
env:
TOKEN_NAME: BOOK_UPLOAD_TOKEN_${{ github.ref_name }}
with:
folder: website
repository-name: "resampling-stats/${{ github.ref_name }}"
branch: main
single-commit: true
token: ${{ secrets[env.TOKEN_NAME] }}