Skip to content

Workflow file for this run

on:
release:
types: [published]
workflow_dispatch:
name: Build pkgdown site and push
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
with:
ref: cf-pages
- name: Hard reset to the ref that triggered the workflow
run: |
git fetch --all
git reset --hard tags/$GITHUB_REF_NAME
- 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
working-directory: "./antidotum/tergo"
- uses: r-lib/actions/setup-tinytex@v2
- name: Run pkgdown and push to cf-pages
working-directory: ./antidotum/tergo
run: |
Rscript -e "pkgdown::build_site()"
git add --all
git config --global user.email "[email protected]"
git config --global user.name "Github Minion"
git commit -m "$GITHUB_REF_NAME"
git push --force origin cf-pages