Skip to content

Commit

Permalink
fix docker-ci.yml, add check for updated README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
gorgitko committed Dec 4, 2023
1 parent 358cd34 commit c8c6df8
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/docker-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ jobs:
-e USERID=$(id -u) \
-e GROUPID=$(id -g) \
${{ env.IMAGE }}:${{ env.TEST_TAG }}
- name: Render README.md
run: |
docker exec -w /home/rstudio/scdrake_source scdrake_test \
Rscript -e 'rmarkdown::render("README.Rmd")'
git diff --exit-code README.md
# If exit code is > 0, then there are changes and README.md was not commited
test $? -eq 0 || (echo "README.Rmd has changed, but an updated version of README.md was not included in this commit" && false)
- name: Test image
run: |
docker exec -w /home/rstudio/scdrake_source scdrake_test \
Expand Down Expand Up @@ -113,12 +120,12 @@ jobs:
if: github.event_name == 'release'
run: |
docker exec -w /home/rstudio/scdrake_source scdrake_test \
'sed -i "/development:/d" _pkgdown.yml; sed -i "/mode: devel/d" _pkgdown.yml'
bash -c 'sed -i "/development:/d" _pkgdown.yml; sed -i "/mode: devel/d" _pkgdown.yml'
- name: Build pkgdown site
if: github.event_name != 'pull_request'
run: |
docker exec -w /home/rstudio/scdrake_source scdrake_test \
'Rscript -e "rmarkdown::render('README.Rmd'); pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)"'
Rscript -e "pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)"
- name: Deploy to GitHub pages (stable docs)
if: github.event_name == 'release'
uses: JamesIves/[email protected]
Expand Down

0 comments on commit c8c6df8

Please sign in to comment.