Skip to content

fix readme

fix readme #40

Workflow file for this run

on:
push:
branches: [ main ]
workflow_run:
workflows: ["CI release"]
types:
- completed
name: build docs
permissions: write-all
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:/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
env:
CHANGES: ${{ steps.check_changes.outputs.CHANGES }}
if: env.CHANGES == 'true'
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