-
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.
Merge pull request #512 from jhudsl/pdfs-ugh
Working on fixing some pdf rendering stuff
- Loading branch information
Showing
4 changed files
with
31 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,9 +11,6 @@ on: | |
workflow_dispatch: | ||
push: | ||
branches: [ main, staging ] | ||
paths: | ||
- '**.Rmd' | ||
- '**.md' | ||
|
||
jobs: | ||
|
||
|
@@ -33,7 +30,7 @@ jobs: | |
# # Checks-out your repository with the token so your job can access it | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
with: | ||
# get the full repo | ||
fetch-depth: 0 | ||
|
@@ -42,7 +39,7 @@ jobs: | |
|
||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/changed-files@v37 | ||
uses: tj-actions/changed-files@v41 | ||
# NOTE: `since_last_remote_commit: true` is implied by default and falls back to the previous local commit. | ||
|
||
- name: List all changed files | ||
|
@@ -80,12 +77,13 @@ jobs: | |
Rscript --vanilla "scripts/render_resources.R" --files "${{ steps.changed-files.outputs.all_changed_files }}" | ||
# Generate list of files that need pdfs | ||
- name: Get list of html to pdfs | ||
- name: Generate list of lectures that need pdfs generated | ||
run: | | ||
Rscript --vanilla "scripts/render_html_list.R" | ||
echo the following need pdfs: | ||
echo "$(cat files.txt)" | ||
- name: Read html and pdf files | ||
- name: Store list of lectures that need pdfs generated // Delete intermediate files | ||
id: getfiles | ||
run: | | ||
echo "files=$(cat files.txt)" >> $GITHUB_OUTPUT | ||
|
@@ -135,7 +133,7 @@ jobs: | |
git config --global --add safe.directory /__w/$repo_name/$repo_name | ||
- name: Checkout files | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.GH_PAT }} | ||
|
@@ -152,7 +150,7 @@ jobs: | |
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "jhudsl-robot" | ||
git add . --force | ||
git add *.pdf --force | ||
git commit -m 'Render pdfs' || echo "No changes to commit" | ||
git pull --rebase --set-upstream origin main --allow-unrelated-histories --strategy-option=ours | ||
git push --force || echo "No changes to commit" |
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