-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use render-readme.yaml from epinowcast (#60)
Former-commit-id: d55045cdab4efb2a1a4fddcebfae7d8b841b165e [formerly f074e37f558f78e8d30e129aca4365fedbaff5b6] Former-commit-id: 04f52ca0202ce04f841003947f936ed4f12636eb
- Loading branch information
Showing
1 changed file
with
28 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,8 +7,8 @@ concurrency: | |
on: | ||
workflow_dispatch: | ||
push: | ||
paths: | ||
- 'README.Rmd' | ||
branches: | ||
- main | ||
|
||
jobs: | ||
render-readme: | ||
|
@@ -28,17 +28,35 @@ jobs: | |
- name: Install dependencies | ||
uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
extra-packages: any::rmarkdown, local::. | ||
extra-packages: any::rmarkdown, local::., any::allcontributors | ||
|
||
- name: Update contributors | ||
if: github.ref == 'refs/heads/main' | ||
run: allcontributors::add_contributors(format = "text") | ||
shell: Rscript {0} | ||
|
||
- name: Compile the readme | ||
run: | | ||
rmarkdown::render("README.Rmd") | ||
shell: Rscript {0} | ||
|
||
- name: Commit files | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git add README.md man/figures/ | ||
git diff-index --quiet HEAD || git commit -m "Automatic readme update [ci skip]" | ||
git push origin || echo "No changes to push" | ||
- name: Upload README.md as an artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: readme | ||
path: README.md | ||
|
||
- name: Create Pull Request | ||
if: github.ref == 'refs/heads/main' | ||
uses: peter-evans/create-pull-request@v6 | ||
with: | ||
commit-message: "Automatic README update" | ||
title: "Update README" | ||
body: "This is an automated pull request to update the README." | ||
branch: "update-readme-${{ github.run_number }}" | ||
labels: "documentation" | ||
reviewers: seabbs | ||
add-paths: | | ||
README.Rmd | ||
README.md | ||
token: ${{ secrets.GITHUB_TOKEN }} |