diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index bb25bf7..a7276e8 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -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 diff --git a/_pkgdown.yml b/_pkgdown.yml index eef6ecf..f51b2ee 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -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]