-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from jhudsl/cansavvy/add-check
Add commas and gha check
- Loading branch information
Showing
6 changed files
with
227 additions
and
21 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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
|
||
# Adapted for this jhudsl repository by Candace Savonen Aug 2021 | ||
|
||
name: Render and publish Leanpub | ||
|
||
# Triggers the workflow on pull requests for the master branch OR can be manually triggered | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
# I have it check out the image that is built from: https://github.com/jhudsl/DaSL_Course_Template_Bookdown/blob/main/docker/Dockerfile | ||
container: | ||
image: jhudsl/course_template | ||
|
||
steps: | ||
# Checks-out the _Leanpub repository to run the checks | ||
- name: Checkout code from Leanpub test repo | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: jhudsl/DaSL_Course_Template_Leanpub | ||
token: ${{ secrets.GH_PAT }} | ||
|
||
# Copy over the latest leanbuild and use that for the run | ||
- name: Get latest leanbuild | ||
run: | | ||
sudo apt-get install -y --no-install-recommends subversion | ||
# Copy over the latest leanbuild build | ||
svn export https://github.com/${GITHUB_REPOSITORY}.git/branches/${GITHUB_HEAD_REF} leanbuild/ | ||
# Run leanpub rendering | ||
- name: Run leanbuild::bookdown_to_leanpub | ||
run: | | ||
Rscript -e "devtools::load_all('leanbuild'); leanbuild::bookdown_to_leanpub(footer_text = 'check if footer works')" |
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 |
---|---|---|
@@ -0,0 +1,63 @@ | ||
|
||
# Adapted for this jhudsl repository by Candace Savonen Aug 2021 | ||
|
||
name: Render and publish Leanpub | ||
|
||
# Triggers the workflow AFTER changes to leanbuild have been merged | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ master ] | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
# I have it check out the image that is built from: https://github.com/jhudsl/DaSL_Course_Template_Bookdown/blob/main/docker/Dockerfile | ||
container: | ||
image: jhudsl/course_template | ||
|
||
steps: | ||
# Checks-out the _Leanpub repository to run the checks | ||
- name: Checkout code from Leanpub test repo | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: jhudsl/DaSL_Course_Template_Leanpub | ||
token: ${{ secrets.GH_PAT }} | ||
|
||
# Copy over the latest leanbuild and use that for the run | ||
- name: Get latest leanbuild | ||
run: | | ||
sudo apt-get install -y --no-install-recommends subversion | ||
# Copy over the latest leanbuild build | ||
svn export https://github.com/${GITHUB_REPOSITORY}.git/branches/${GITHUB_HEAD_REF} leanbuild/ | ||
# Run leanpub rendering | ||
- name: Run leanbuild::bookdown_to_leanpub | ||
run: | | ||
Rscript -e "devtools::load_all('leanbuild'); leanbuild::bookdown_to_leanpub(footer_text = 'check if footer works')" | ||
- name: Create PR with newly rendered docs files | ||
uses: peter-evans/create-pull-request@v3 | ||
id: cpr | ||
with: | ||
token: ${{ secrets.GH_PAT }} | ||
commit-message: Show latest leanbuild changes | ||
signoff: false | ||
branch: auto_copy_rendered_files | ||
delete-branch: true | ||
title: 'GHA: Automated transfer of leanbuild-needed files from Bookdown repository' | ||
body: | | ||
### Description: | ||
This PR has changes to this repository's files using the latest leanbuild package changes! | ||
If they don't look right, file an issue on the leanbuild package: https://github.com/jhudsl/leanbuild/issuesand do not merge. | ||
labels: | | ||
automated | ||
reviewers: $GITHUB_ACTOR | ||
|
||
# Write out PR info | ||
- name: Check outputs | ||
run: | | ||
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" | ||
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" |
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 |
---|---|---|
|
@@ -30,7 +30,8 @@ Imports: | |
curl, | ||
rprojroot, | ||
magrittr, | ||
yaml | ||
yaml, | ||
here | ||
Suggests: | ||
didactr, | ||
knitr, | ||
|
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.