File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Deploy pkgdown Site
2+
3+ on :
4+ push :
5+ branches :
6+ - main # Trigger the workflow on pushes to the main branch
7+
8+ jobs :
9+ build-deploy :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ # Checkout the repository
14+ - name : Checkout repository
15+ uses : actions/checkout@v3
16+
17+ # Set up R
18+ - name : Set up R
19+ uses : r-lib/actions/setup-r@v2
20+ with :
21+ r-version : ' 4.3' # Adjust to your R version
22+
23+ # Install dependencies
24+ - name : Install dependencies
25+ run : |
26+ install.packages('remotes')
27+ remotes::install_deps(dependencies = TRUE)
28+
29+ # Build the pkgdown site
30+ - name : Build pkgdown site
31+ run : |
32+ install.packages('pkgdown')
33+ pkgdown::build_site()
34+
35+ # Deploy to gh-pages branch
36+ - name : Deploy to GitHub Pages
37+ uses : peaceiris/actions-gh-pages@v3
38+ with :
39+ github_token : ${{ secrets.GITHUB_TOKEN }}
40+ publish_dir : ./docs
41+ publish_branch : gh-pages
You can’t perform that action at this time.
0 commit comments