Skip to content

Commit

Permalink
Adding custom github action to render and deploy the website.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kristof Van Der Haeghen committed Jan 26, 2024
1 parent ad11dde commit 8d37c0b
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/github-action-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
on:
push:
branches:
- master
- main
name: Render & Deploy Site
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up R
uses: r-lib/actions/setup-r@v2
- name: Set up Pandoc
- uses: r-lib/actions/setup-pandoc@v2
- name: Install dependencies
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgdown, local::.
needs: website
- name: Render Site
run: Rscript -e 'rmarkdown::render_site(input = "webBuild", output_format = "all" envir = parent.frame(), quiet = FALSE, encoding = "UTF-8")'
- name: Commit results
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Actions"
git add -A
git commit -m 'Rebuild site' || echo "No changes to commit"
git push origin || echo "No changes to commit"
deploy:
permissions:
contents: read
pages: write
id-token: write
runs-on: ubuntu-latest
needs: jekyll-build
environment:
name: github-pages
url: ${{steps.deployment.outputs.page_url}}
steps:
- name: Deploy artifact
id: deployment
uses: actions/deploy-pages@v1

0 comments on commit 8d37c0b

Please sign in to comment.