Skip to content

Commit

Permalink
Merge pull request #42 from inbo/automate-docs-creation
Browse files Browse the repository at this point in the history
Create Build pkgdown site.yaml
  • Loading branch information
SanderDevisscher authored Jul 22, 2024
2 parents db73f22 + 6d4181d commit 29bd107
Show file tree
Hide file tree
Showing 27 changed files with 589 additions and 64 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/Build pkgdown site.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Build pkgdown site

on:
pull_request:
branches:
- main

jobs:
build-site:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: ubuntu-latest, r: 'release'}

env:
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GH_PAT }}

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libxml2-dev libssl-dev libcurl4-openssl-dev
sudo apt-get install -y libharfbuzz-dev libfribidi-dev
sudo apt-get install -y pandoc
sudo apt-get install -y libudunits2-dev
sudo apt-get install -y libgeos-dev libproj-dev libgdal-dev
- name: Install R package dependencies
run: |
install.packages('remotes')
remotes::install_deps(dependencies = TRUE)
install.packages('devtools')
devtools::install_github('inbo/fistools', auth_token = Sys.getenv("GITHUB_PAT"))
shell: Rscript {0}

- name: Install pkgdown
run: install.packages('pkgdown')
shell: Rscript {0}

- name: Build pkgdown site
run: pkgdown::build_site()
shell: Rscript {0}

- name: Commit and push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add -A
git commit -m 'Build pkgdown site [skip ci]'
git pull --rebase origin ${{ github.head_ref }}
git push origin HEAD:${{ github.head_ref }}
1 change: 0 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ Imports:
progress (>= 1.2.3),
googledrive (>= 2.1.1),
svDialogs (>= 1.1.0),
utils (>= 4.3.2),
uuid (>= 1.2.0),
devtools (>= 2.4.5),
DBI (>= 1.2.3),
Expand Down
2 changes: 1 addition & 1 deletion docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions docs/CODE_OF_CONDUCT.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/LICENSE-text.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions docs/LICENSE.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions docs/authors.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions docs/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pandoc: 3.1.11
pandoc: 2.9.2.1
pkgdown: 2.1.0
pkgdown_sha: ~
articles: {}
last_built: 2024-07-18T12:57Z
last_built: 2024-07-22T13:09Z
Loading

0 comments on commit 29bd107

Please sign in to comment.