-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
148 additions
and
180 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
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
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
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,54 @@ | ||
|
||
# Candace Savonen Apr 2021 | ||
|
||
name: Render Coursera | ||
|
||
#---TRIGGER-START---# | ||
on: | ||
workflow_dispatch: | ||
workflow_run: | ||
workflows: [ "Render Bookdown" ] | ||
branches: [ main, staging ] | ||
types: | ||
- completed | ||
#---TRIGGER-END----# | ||
|
||
jobs: | ||
render-coursera: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: jhudsl/course_template | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.GH_PAT }} | ||
|
||
- name: Login as jhudsl-robot | ||
run: | | ||
git config --local user.email "itcrtrainingnetwork@gmail.com" | ||
git config --local user.name "jhudsl-robot" | ||
# Run Coursera version | ||
- name: Run Coursera version of render | ||
id: coursera | ||
run: Rscript -e "ottr::render_coursera(convert_quizzes = TRUE)" | ||
|
||
# This checks on the steps before it and makes sure that they completed. | ||
# If the renders didn't complete we don't want to commit the file changes | ||
- name: Check on render steps | ||
if: steps.coursera.outcome != 'success' | ||
run: | | ||
echo Coursera status ${{steps.coursera.outcome}} | ||
exit 1 | ||
# Commit the rendered bookdown files | ||
- name: Commit rendered Coursera files | ||
run: | | ||
git config --local user.email "actions@github.com" | ||
git config --local user.name "GitHub Actions" | ||
git add --force docs/coursera/* | ||
git commit -m 'Render Coursera' || echo "No changes to commit" | ||
git push origin main || echo "No changes to push" |
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
Oops, something went wrong.