Skip to content

Commit

Permalink
Create Build_gh-pages.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristinaSchmidt1 committed Oct 23, 2024
1 parent 51de834 commit 9704fd2
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/Build_gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples and adapted
on:
push:
branches: [main, master]

name: Build_gh-pages.yml #shown when action is run

jobs:
pkgdown:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} #to push results to gh-pages branch!
steps: #Series of steps that is executed sequencially: https://github.com/r-lib/actions/
- uses: actions/checkout@v4 # goes to gh-pages branch to work there

- uses: r-lib/actions/setup-pandoc@v2 #installs pandoc

- uses: r-lib/actions/setup-r@v2 #installs R
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgdown
needs: website

- name: Deploy to GitHub pages 🚀
run: |
git config --local user.name "GitHub Actions"
git config --local user.email "[email protected]"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'

0 comments on commit 9704fd2

Please sign in to comment.