Skip to content

Commit

Permalink
Giving it another try
Browse files Browse the repository at this point in the history
  • Loading branch information
larsvilhuber committed Jul 1, 2024
1 parent a4a889b commit f661f84
Showing 1 changed file with 48 additions and 11 deletions.
59 changes: 48 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ on:

# This job installs dependencies, builds the book, and pushes it to `gh-pages`
jobs:
deploy-book:
compile-jupyterbook:
runs-on: ubuntu-22.04
outputs:
bookurl: ${{ steps.artifact-upload-step1.outputs.artifact-url }}
steps:
- uses: actions/checkout@v2

Expand All @@ -34,6 +36,20 @@ jobs:
- name: Build the book
run: |
jupyter-book build .
- name: Upload Artifact
id: artifact-upload-step1
uses: actions/upload-artifact@v4
with:
name: artifact-book
path: _build/html
retention-days: 1

compile-presentation:
runs-on: ubuntu-22.04
outputs:
presentationurl: ${{ steps.artifact-upload-step2.outputs.artifact-url }}
steps:
- uses: actions/checkout@v2
# Let's do the Quarto
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
Expand All @@ -43,27 +59,48 @@ jobs:
r-version: '4.4.0'

- name: Install R Dependencies
uses: r-lib/actions/setup-renv@v2
with:
cache-version: 1

run: |
Rscript presentation/libraries.R
- name: Render Quarto Project
# uses: quarto-dev/quarto-actions/render@v2
# with:
# path: ./presentation
run: |
cd presentation
quarto render index.Rmd
- name: Move outputs around
run: |
mkdir _build/html/presentation
mv presentation/index* _build/html/presentation/
- name: Upload Artifact
id: artifact-upload-step2
uses: actions/upload-artifact@v4
with:
name: artifact-presentation
path: |
index_files/
index.html
retention-days: 1

# Book is now in _build/html
deploy-book:
runs-on: ubuntu-22.04
needs:
- compile-jupyterbook
- compile-presentation
steps:
# Pull down both artifacts
- name: Download Book Artifacts
uses: actions/download-artifact@v4
with:
path: .
pattern: artifact-book
- name: Download Pres Artifacts
uses: actions/download-artifact@v4
with:
path: presentation
pattern: artifact-presentation
# Prepare the GitHub Pages action
- name: prepare GitHub Pages action
uses: actions/[email protected]
with:
path: ./_build/html
path: .
# publish:
# needs: deploy-book
# runs-on: ubuntu-latest
Expand Down

0 comments on commit f661f84

Please sign in to comment.