Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: fhdsl/DataViz_Practice
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 21f9047fec63d9e97595338cc4bf19a55ac13bf8
Choose a base ref
..
head repository: fhdsl/DataViz_Practice
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 00190ab4b8e8dd87822acc17d062289b413f549f
Choose a head ref
Showing with 48 additions and 8 deletions.
  1. +10 −0 .github/workflows/check-url.yml
  2. +28 −4 .github/workflows/pull_request.yml
  3. +6 −4 .github/workflows/render-all.yml
  4. +4 −0 config_automation.yml
10 changes: 10 additions & 0 deletions .github/workflows/check-url.yml
Original file line number Diff line number Diff line change
@@ -78,6 +78,16 @@ jobs:
run: |
echo ${{ steps.check-report.outputs.error_url }}
echo ${{ steps.check-report.outputs.error_num }}
# Commit file
- name: Commit tocless bookdown files
if: ${{ steps.check-report.outputs.error_num >= 1 }}
env:
GH_PAT: ${{ secrets.GH_PAT }}
run: |
git add --force check_reports/url_checks.tsv
git commit -m 'Add spell check file' || echo "No changes to commit"
git push --set-upstream origin preview-spell-error || echo echo branch exists remotely
- name: Find issues
id: find-issue
32 changes: 28 additions & 4 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
@@ -17,7 +17,6 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GH_PAT }}

# Use the yaml-env-action action.
- name: Load environment from YAML
@@ -49,6 +48,8 @@ jobs:
toggle_style_code: "${{ env.STYLE_CODE }}"
toggle_url_check: "${{ env.URL_CHECKER }}"
toggle_quiz_check: "${{ env.CHECK_QUIZZES }}"
toggle_md_linter: "${{ env.MARKDOWN_LINTER }}"
toggle_readability: "${{ env.READABILITY_REPORT }}"
toggle_render_preview: "${{ env.RENDER_PREVIEW }}"
rendering_docker_image: "${{ env.RENDERING_DOCKER_IMAGE }}"

@@ -61,8 +62,9 @@ jobs:
with:
check_type: spelling
error_min: 3
gh_pat: secrets.GH_PAT
branch_name: ${GITHUB_HEAD_REF}
secrets:
gh_pat: ${{ secrets.GH_PAT }}

url-check:
name: Check URLs
@@ -72,8 +74,9 @@ jobs:
with:
check_type: urls
error_min: 0
gh_pat: secrets.GH_PAT
branch_name: ${GITHUB_HEAD_REF}
secrets:
gh_pat: ${{ secrets.GH_PAT }}

quiz-check:
name: Check quiz formatting
@@ -83,8 +86,9 @@ jobs:
with:
check_type: quiz_format
error_min: 0
gh_pat: secrets.GH_PAT
branch_name: ${GITHUB_HEAD_REF}
secrets:
gh_pat: ${{ secrets.GH_PAT }}

############################# Style the code ###################################
style-code:
@@ -111,6 +115,26 @@ jobs:
git commit -m 'Style *mds' || echo "No changes to commit"
git push origin || echo "No changes to commit"
############################# Readability Report ###################################

readability-report:
name: Readability report
needs: yaml-check
runs-on: ubuntu-latest
if: ${{needs.yaml-check.outputs.toggle_readability == 'yes'}}

steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Readability report
uses: Rebilly/lexi@v2
with:
github-token: ${{ secrets.GH_PAT }}
glob: '**/*.md'

############################# Render Preview ###################################

render-preview:
10 changes: 6 additions & 4 deletions .github/workflows/render-all.yml
Original file line number Diff line number Diff line change
@@ -8,7 +8,8 @@ on:
push:
branches: [ main, staging ]
paths:
- '**md$'
- '*.qmd'
- '*.Rmd'
- assets/*
- quizzes/*

@@ -101,7 +102,7 @@ jobs:
git add --force docs/*
git commit -m 'Render course' || echo "No changes to commit"
git status docs/*
git push -u origin main || echo "No changes to push"
git push --force -u origin main || echo "No changes to push"
render-tocless:
name: Render TOC-less version for Leanpub or Coursera
@@ -149,7 +150,7 @@ jobs:
git add --force docs/no_toc*
git commit -m 'Render toc-less' || echo "No changes to commit"
git status docs/no_toc*
git push -u origin main || echo "No changes to push"
git push --force -u origin main || echo "No changes to push"
render-leanpub:
name: Finish Leanpub prep
@@ -188,6 +189,7 @@ jobs:
--git_pat ${{ secrets.GH_PAT }} \
--repo $GITHUB_REPOSITORY \
--output_dir resources/chapt_screen_images)
rm make_screenshots.R
# We want a fresh run of the renders each time
- name: Delete manuscript/
@@ -276,4 +278,4 @@ jobs:
git add --force docs/*
git commit -m 'Render Coursera quizzes' || echo "No changes to commit"
git status
git push -u origin main || echo "No changes to push"
git push --force -u origin main || echo "No changes to push"
4 changes: 4 additions & 0 deletions config_automation.yml
Original file line number Diff line number Diff line change
@@ -10,6 +10,10 @@ render-preview: yes
spell-check: yes
# Style any R code
style-code: yes
# Would you like your markdown files to be checked for formatting
markdown-linter: yes
# Would you like a readability report on your markdowns?
readability-report: yes
# Test build the docker image if any docker-relevant files have been changed
docker-test: no
# Should URLs be tested periodically?