-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (31 loc) · 1.07 KB
/
deploy_docs.yml
File metadata and controls
43 lines (31 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Deploy Documentation
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup R
uses: r-lib/actions/setup-r@v2
- name: Install rmarkdown
run: Rscript -e 'install.packages("rmarkdown")'
- name: Install remotes
run: Rscript -e 'if (!requireNamespace("remotes", quietly = TRUE)) install.packages("remotes")'
- name: Install plotcli
env:
GITHUB_PAT: ${{ secrets.GH_PAGES_PAT }}
run: Rscript -e 'Sys.setenv(GITHUB_PAT = Sys.getenv("GITHUB_PAT")); remotes::install_github("cheuerde/plotcli", upgrade = "never")'
- name: Install pandoc
run: sudo apt update && sudo apt install -y pandoc
- name: Render RMarkdown to HTML
run: Rscript -e 'rmarkdown::render("plotcli_docs.Rmd", output_file = "index.html")'
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GH_PAGES_PAT }}
publish_dir: ./
publish_branch: gh-pages