update book files #49
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
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples | |
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help | |
# Workflow triggering derived from: https://stevenmortimer.com/running-github-actions-sequentially/ | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- inst/examples | |
- '**.Rmd' | |
- '**.qmd' | |
workflow_dispatch: | |
permissions: write-all | |
name: renderbook-quarto | |
jobs: | |
render-book: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
use-public-rspm: true | |
- name: Install devtools package | |
run: Rscript -e 'install.packages("devtools")' | |
- name: Install comhis package from GitHub | |
run: Rscript -e 'devtools::install_github("comhis/comhis")' | |
- uses: quarto-dev/quarto-actions/setup@v2 | |
- uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
needs: website | |
extra-packages: | |
any::devtools | |
local::. | |
- name: Render and Publish quarto | |
uses: quarto-dev/quarto-actions/publish@v2 | |
with: | |
target: gh-pages | |
path: inst/examples | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name : Import CSV visualiser | |
run : cp -r inst/examples/dataTable inst/examples/_book/ | |
- name : Import output.tables | |
run : cp -r inst/examples/output.tables inst/examples/_book/ | |
- name: Deploy package | |
run: | | |
git config --local user.name "$GITHUB_ACTOR" | |
git config --local user.email "[email protected]" | |
git add . | |
git commit -m "Re-render bookdown documents" || echo "No changes to commit" | |
git push origin || echo "No changes to commit" | |
- name: Trigger link checker workflow | |
if: success() | |
uses: peter-evans/repository-dispatch@v1 | |
with: | |
token: ${{ secrets.REPO_GHA_PAT }} | |
repository: ${{ github.repository }} | |
event-type: trigger-link-check-workflow | |
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}' |