Skip to content

Commit

Permalink
changed complete yml file
Browse files Browse the repository at this point in the history
  • Loading branch information
nbruder committed Nov 27, 2023
1 parent 1528c96 commit 1e55313
Showing 1 changed file with 25 additions and 59 deletions.
84 changes: 25 additions & 59 deletions .github/workflows/build-and-deplay-validation-report.yml
Original file line number Diff line number Diff line change
@@ -1,79 +1,45 @@
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
on:
workflow_dispatch:
push:
branches:
- main
- master
- nico
branches: [main, master, nico]
pull_request:
branches:
- main
- master
schedule:
- cron: "0 2 * * 2"
branches: [main, master]
workflow_dispatch:

name: build-and-deploy-validation-report
name: build-and-deplay-validation-report.yml

jobs:
build-and-deploy:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
strategy:
fail-fast: false
matrix:
config:
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}

bookdown:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
RSPM: ${{ matrix.config.rspm }}

GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}

- uses: r-lib/actions/setup-pandoc@v2

- name: Query dependencies
run: |
install.packages('remotes')
shell: Rscript {0}

- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v2
- uses: r-lib/actions/setup-r@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
use-public-rspm: true

- name: Install system dependencies
if: runner.os == 'Linux'
run: |
while read -r cmd
do
eval sudo $cmd
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
- uses: r-lib/actions/setup-renv@v2

- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
tinytex::install_tinytex()
shell: Rscript {0}
- name: Cache bookdown results
uses: actions/cache@v3
with:
path: _bookdown_files
key: bookdown-${{ hashFiles('**/*Rmd') }}
restore-keys: bookdown-

- name: Build report
run: |
bookdown::render_book("index.Rmd", output_format = "all")
- name: Build site
run: bookdown::render_book("index.Rmd", quiet = TRUE)
shell: Rscript {0}

- name: Deploy 🚀 report
- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/[email protected].3
uses: JamesIves/github-pages-deploy-action@v4.4.1
with:
branch: gh-pages # The branch the action should deploy to.
folder: _book # The folder the action should deploy.
branch: gh-pages
folder: _book

0 comments on commit 1e55313

Please sign in to comment.