-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix docker-ci.yml, add check for updated README.md
- Loading branch information
Showing
1 changed file
with
9 additions
and
2 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 |
---|---|---|
|
@@ -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 \ | ||
|
@@ -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] | ||
|