Skip to content

Commit

Permalink
pkgdown
Browse files Browse the repository at this point in the history
  • Loading branch information
adriancorrendo committed Mar 23, 2024
1 parent fdb7da9 commit a4fee4f
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 113 deletions.
94 changes: 48 additions & 46 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -1,46 +1,48 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
release:
types: [published]
workflow_dispatch:

name: pkgdown

jobs:
pkgdown:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3

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

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgdown, local::.
needs: website

- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.4.1
with:
clean: false
branch: gh-pages
folder: docs
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
release:
types: [published]
workflow_dispatch:

name: pkgdown

jobs:
pkgdown:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4

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

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgdown, local::.
needs: website

- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
clean: false
branch: gh-pages
folder: docs
67 changes: 0 additions & 67 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,71 +1,4 @@
url: https://adriancorrendo.github.io/metrica/
template:
bootstrap: 5
bootswatch: flatly
theme: ayu-light
bslib:
base_font: {google: "Barlow Condensed"}
heading_font: {google: "Barlow Semi Condensed"}
code_font: {google: "Ubuntu Mono"}

navbar:
structure:
left: [functions, metrics, tutorials, cheatsheet, more, news]
right: [github, contact, search]

components:
functions:
icon: fa-gears
text: "Functions"
href: reference/index.html

metrics:
icon: fa-ruler
text: "Metrics"
menu:
- text: "Regression performance"
href: articles/available_metrics_regression.html
- text: "Classification performance"
href: articles/available_metrics_classification.html

tutorials:
icon: fa-paperclip
text: "Tutorials"
menu:
- text: "Regression"
href: articles/regression_case.html
- text: "Classification"
href: articles/classification_case.html
- text: "Import APSIM files"
href: articles/apsim_open.html

cheatsheet:
icon: fa-note-sticky
text: "Cheatsheet"
href: articles/Cheatsheet.html

more:
icon: fa-plus
text: "More"
menu:
- text: "JOSS publication"
href: articles/JOSS_publication.html
- text: "Shinyapp"
href: articles/Shinyapp.html

news:
icon: fa-newspaper
text: "News"
href: news/index.html

github:
icon: fa-github
hreft: https://github.com/adriancorrendo/metrica/

contact:
icon: fa-user
hreft: https://adriancorrendo.github.io/

home:
sidebar:
structure: [citation, dev, links, community, license, authors]

0 comments on commit a4fee4f

Please sign in to comment.