Skip to content

Commit

Permalink
Update pkgdown.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
mmatyi authored Feb 22, 2024
1 parent 88302ff commit 190527a
Showing 1 changed file with 10 additions and 83 deletions.
93 changes: 10 additions & 83 deletions .github/old/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -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 "[email protected]"
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 '<!DOCTYPE html><html><head><meta http-equiv="refresh" content="0;URL=/dev/index.html" /> <script language="javascript"> window.location.replace('/dev/index.html')</script></head></html>' > ./docs/index.html
- name: Deploy to Netlify
if: contains(env.isPush, 'false')
id: netlify-deploy
uses: nwtgck/[email protected]
- 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

0 comments on commit 190527a

Please sign in to comment.