From 190527abe06df25c08bd214f8d7127df475c2030 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9sz=C3=A1ros=20M=C3=A1ty=C3=A1s?= <34501282+mmatyi@users.noreply.github.com> Date: Thu, 22 Feb 2024 15:51:44 +0100 Subject: [PATCH] Update pkgdown.yaml --- .github/old/pkgdown.yaml | 93 +++++----------------------------------- 1 file changed, 10 insertions(+), 83 deletions(-) diff --git a/.github/old/pkgdown.yaml b/.github/old/pkgdown.yaml index 088000e..0efe2f6 100644 --- a/.github/old/pkgdown.yaml +++ b/.github/old/pkgdown.yaml @@ -1,97 +1,24 @@ +# Controls when the action will run. on: push: branches: - main - master - pull_request: - branches: - - master - - main -name: pkgdown +name: pkgdown-regi jobs: pkgdown: - if: github.event_name == 'push' || github.event.pull_request.head.repo.fork == false - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 env: RSPM: https://packagemanager.rstudio.com/cran/__linux__/bionic/latest GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} - NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} - isPush: ${{ github.event_name == 'push' }} - + name: doc update + container: rocker/verse steps: - - uses: actions/checkout@v2 - - - uses: r-lib/actions/setup-r@v1 - id: install-r - - - uses: r-lib/actions/setup-pandoc@v1 - - - uses: r-lib/actions/setup-tinytex@v1 - - - name: Install pak and query dependencies - run: | - install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/") - saveRDS(pak::pkg_deps("local::.", dependencies = TRUE), ".github/r-depends.rds") - shell: Rscript {0} - - - name: Cache R packages - uses: actions/cache@v2 - with: - path: ${{ env.R_LIBS_USER }} - key: ubuntu-18.04-${{ steps.install-r.outputs.installed-r-version }}-1-${{ hashFiles('.github/r-depends.rds') }} - restore-keys: ubuntu-18.04-${{ steps.install-r.outputs.installed-r-version }}-1- - - - name: Install system dependencies - if: runner.os == 'Linux' - run: | - pak::local_system_requirements(execute = TRUE) - pak::pkg_system_requirements("pkgdown", execute = TRUE) - shell: Rscript {0} - - - name: Install dependencies - run: | - pak::local_install_dev_deps(upgrade = TRUE) - pak::pkg_install("pkgdown") - pak::pkg_install("devtools") - shell: Rscript {0} - - - name: Install package - run: | - devtools::install_github("eurostat/restatapi") - shell: Rscript {0} - - - name: Build and deploy pkgdown site - if: contains(env.isPush, 'true') - run: | - git config --local user.name "$GITHUB_ACTOR" - git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com" - Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)' - - name: Create website - if: contains(env.isPush, 'false') - run: | - pkgdown::build_site() - shell: Rscript {0} - - - name: Create index file - if: contains(env.isPush, 'false') - run: | - echo ' ' > ./docs/index.html - - name: Deploy to Netlify - if: contains(env.isPush, 'false') - id: netlify-deploy - uses: nwtgck/actions-netlify@v1.1 + - uses: actions/checkout@v4 + - run: Rscript ./.github/workflows/make_doc.R + - uses: stefanzweifel/git-auto-commit-action@v4 with: - publish-dir: './docs' - production-branch: master - github-token: ${{ secrets.GITHUB_TOKEN }} - deploy-message: - 'Deploy from GHA: ${{ github.event.pull_request.title || github.event.head_commit.message }} (${{ github.sha }})' - # these all default to 'true' - enable-pull-request-comment: false - enable-commit-comment: false - # enable-commit-status: true - # overwrites-pull-request-comment: true - timeout-minutes: 1 + commit_message: auto updating documentation after commit +