Skip to content

Remove Bashism that breaks GHA worflow #138

Remove Bashism that breaks GHA worflow

Remove Bashism that breaks GHA worflow #138

Workflow file for this run

name: Dev build
on:
push:
branches: [main]
workflow_dispatch:
jobs:
build:
name: Dev build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
dependencies: NA
extra-packages: any::devtools
- name: Build package
run: |
# Workaround for bug #1070 in roxygen2 7.1.0
writeLines('# Generated by roxygen2: do not edit by hand', 'NAMESPACE')
devtools::document()
shell: Rscript {0}
- name: Commit development build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name $GITHUB_ACTOR
git config user.email $GITHUB_ACTOR@users.noreply.github.com
git remote set-url --push origin https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git
git branch -D build 2>/dev/null || :
git checkout -b build
git add --force NAMESPACE man
git commit -m 'Create a development build'
git push --force origin build
docs:
name: Publish documentation
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v6
with:
ref: build
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y inkscape pngcrush
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
dependencies: NA
extra-packages: any::pkgdown
- name: Build documentation
run: |
make site
- name: Publish documentation
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name $GITHUB_ACTOR
git config user.email $GITHUB_ACTOR@users.noreply.github.com
git remote set-url --push origin https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git
git branch -D site 2>/dev/null || :
git checkout -b site
git add --force docs
git commit -m 'Build documentation'
git push --force origin site