Skip to content

aiai2

aiai2 #32

Workflow file for this run

on:
push:
branches: [ main ]
workflow_run:
workflows: ["CI release"]
types:
- completed
name: build docs
jobs:
run_commands:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Set up Pandoc
uses: r-lib/actions/setup-pandoc@v2
- name: Set up R
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- name: Set up R dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
working-directory: ./rdocs
extra-packages: local::.
- name: build documentation
run: |
rdocs::generate_docs(files = "./rdocs/R/main.R", folder_name = "docs", gh_url = "https://github.com/daniellga/rdocs/tree/main/rdocs/R", run_examples = FALSE)
shell: Rscript {0}
- name: Check for changes
id: check_changes
run: |
ls
cd docs
ls
if [[ -n $(git status --porcelain) ]]; then
echo "changes=true" >> "$GITHUB_OUTPUT"
fi
- name: Commit and push changes
if: steps.check_changes.outputs.GITHUB_ENV == 'true'
needs: check_changes

Check failure on line 57 in .github/workflows/build_docs.yml

View workflow run for this annotation

GitHub Actions / build docs

Invalid workflow file

The workflow is not valid. .github/workflows/build_docs.yml (Line: 57, Col: 9): Unexpected value 'needs'
run: |
git config --global user.email "${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com"
git config --global user.name "${GITHUB_ACTOR}"
git add .
git commit -m "Update docs"
git push origin main