Skip to content

Commit 8883f7a

Browse files
committed
move deploy to github actions
1 parent 8991944 commit 8883f7a

File tree

3 files changed

+43
-7
lines changed

3 files changed

+43
-7
lines changed

.github/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.html

.github/workflows/pkgdown.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
on:
2+
push:
3+
branches: master
4+
5+
name: pkgdown
6+
7+
jobs:
8+
pkgdown:
9+
runs-on: macOS-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
13+
- uses: r-lib/actions/setup-r@master
14+
15+
- uses: r-lib/actions/setup-pandoc@master
16+
17+
- name: Query dependencies
18+
run: |
19+
install.packages('remotes')
20+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), "depends.Rds", version = 2)
21+
shell: Rscript {0}
22+
23+
- name: Cache R packages
24+
uses: actions/cache@v1
25+
with:
26+
path: ${{ env.R_LIBS_USER }}
27+
key: macOS-r-3.6-${{ hashFiles('depends.Rds') }}
28+
restore-keys: macOS-r-3.6-
29+
30+
- name: Install dependencies
31+
run: |
32+
install.packages("remotes")
33+
remotes::install_deps(dependencies = TRUE)
34+
remotes::install_dev("pkgdown")
35+
shell: Rscript {0}
36+
37+
- name: Install package
38+
run: R CMD INSTALL .
39+
40+
- name: Deploy package
41+
run: pkgdown::deploy_to_branch(new_process = FALSE)
42+
shell: Rscript {0}

.travis.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,6 @@ addons:
1111
- libudunits2-dev
1212
- libmagick++-dev
1313

14-
# for pkgdown
15-
before_cache: Rscript -e 'remotes::install_cran("pkgdown")'
16-
deploy:
17-
provider: script
18-
script: Rscript -e 'pkgdown::deploy_site_github(ssh_id = Sys.getenv("TRAVIS_DEPLOY_KEY", ""))'
19-
skip_cleanup: true
20-
2114
# for codecov
2215
r_packages:
2316
- covr

0 commit comments

Comments
 (0)