Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cansavvy committed Feb 22, 2024
1 parent 9556a09 commit 42a0dae
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/refresh-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,31 +50,25 @@ jobs:
fetch-depth: 0
token: ${{ secrets.METRICMINER_GITHUB_PAT }}

# We want a fresh run of the renders each time - so first delete old html files
- name: Delete old *.html
run: Rscript -e "rmarkdown::clean_site(preview = FALSE)"

# Now we want to render all the html files from the Rmd files
- name: Run render html
id: site
run: Rscript -e "rmarkdown::render_site()"

# 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.site.outcome != 'success'
run: |
echo site status ${{steps.site.outcome}}
exit 1
# Commit the rendered site files - html files and site_libs files
- name: Commit rendered site files
run: |
git config --system --add safe.directory $GITHUB_WORKSPACE
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git add --force *.html
git add --force subdir_html/*.html
git add --force site_libs/*
git commit -m 'Render site' || echo "No changes to commit"
git push origin main || echo "No changes to push"

0 comments on commit 42a0dae

Please sign in to comment.