fix broken link to method section (#757) #42
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- master | |
- main | |
paths: | |
- 'docs/**' | |
- '.github/workflows/bookdown.yaml' | |
name: Build and deploy book | |
jobs: | |
build: | |
runs-on: macOS-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
R_KNITR_OPTIONS: "knitr.chunk.tidy=TRUE" | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
- name: Setup R | |
uses: r-lib/actions/setup-r@v2 | |
- name: Install Pandoc | |
uses: r-lib/actions/setup-pandoc@v2 | |
with: | |
pandoc-version: '2.11.4' | |
- name: Install TinyTeX | |
uses: r-lib/actions/setup-tinytex@v2 | |
env: | |
# install full prebuilt version | |
TINYTEX_INSTALLER: TinyTeX | |
- name: Install OS dependencies | |
run: | | |
brew update --preinstall | |
brew install --cask xquartz | |
brew install --cask calibre | |
- uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
extra-packages: local::. | |
needs: book | |
- name: Cache bookdown results | |
uses: actions/cache@v2 | |
with: | |
path: docs/_bookdown_files | |
key: bookdown-1-${{ hashFiles('docs/*Rmd') }} | |
restore-keys: bookdown-1- | |
- name: Build and Deploy all book | |
if: github.event_name == 'push' | |
env: | |
CONNECT_API_KEY: ${{ secrets.RSC_BOOKDOWN_ORG_TOKEN }} | |
CONTENT_ID: 463 | |
run: make -C docs all | |
- uses: actions/github-script@v3 | |
env: | |
URL: https://bookdown.org/yihui/blogdown | |
with: | |
github-token: ${{secrets.GITHUB_TOKEN}} | |
script: | | |
github.repos.createCommitStatus({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
sha: context.sha, | |
state: "success", | |
target_url: "${{ env.URL}}", | |
description: "Book deployed!", | |
context: "bookdown.org" | |
}) | |
- name: Upload book folder for debug | |
if: failure() | |
uses: actions/upload-artifact@main | |
with: | |
name: book-dir | |
path: docs |