Skip to content
Merged
Show file tree
Hide file tree
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
40 changes: 23 additions & 17 deletions .github/workflows/bookdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ on:
branches: [main, master]
workflow_dispatch:

name: bookdown
name: bookdown.yaml

jobs:
bookdown:
build:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
Expand Down Expand Up @@ -39,19 +39,25 @@ jobs:
run: bookdown::render_book("index.Rmd", quiet = TRUE)
shell: Rscript {0}

- name: Deploy to Netlify
if: contains(env.isExtPR, 'false')
id: netlify-deploy
uses: nwtgck/[email protected]
- name: Upload website artifact
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' }}
uses: actions/upload-pages-artifact@v3
with:
publish-dir: './_book'
production-branch: master
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message:
'Deploy from GHA: ${{ github.event.pull_request.title || github.event.head_commit.message }} (${{ github.sha }})'
enable-pull-request-comment: false
enable-commit-comment: false
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1
path: "_book"

deploy:
needs: build

permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ _book
_main.*
adv-r-source.zip
crc

/.quarto/
Loading
Loading