Skip to content

Run checks on update_datasets change, but report success early. #142

Run checks on update_datasets change, but report success early.

Run checks on update_datasets change, but report success early. #142

Workflow file for this run

# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main]
pull_request:
branches: [main]
release:
types: [published]
workflow_dispatch:
name: pkgdown
jobs:
pkgdown:

Check failure on line 15 in .github/workflows/pkgdown.yaml

View workflow run for this annotation

GitHub Actions / pkgdown

Invalid workflow file

The workflow is not valid. .github/workflows/pkgdown.yaml (Line: 15, Col: 3): The workflow must contain at least one job with no dependencies.
needs: check-files
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:
fetch-depth: 2 # Ensure at least one commit history is fetched
- name: Check if only workflow file has changed
id: file-check
run: |
if git diff --name-only HEAD^ HEAD | grep -v -e '^.github/workflows/update_datasets.yaml$'; then
echo "other-files-changed=true" >> $GITHUB_ENV
else
echo "other-files-changed=false" >> $GITHUB_ENV
fi
- name: Skip workflow if only workflow file has changed
if: env.other-files-changed == 'false'
run: echo "Only workflow file has changed. Reporting success."
- name: Setup Pandoc
if: env.other-files-changed == 'true'
uses: r-lib/actions/setup-pandoc@v2
- name: Setup R
if: env.other-files-changed == 'true'
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- name: Setup R dependencies
if: env.other-files-changed == 'true'
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgdown, local::.
needs: website
- name: Build site
if: env.other-files-changed == 'true'
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}
- name: Deploy to GitHub pages 🚀
if: env.other-files-changed == 'true' && github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.4.1
with:
clean: false
branch: gh-pages
folder: docs