-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (91 loc) · 2.99 KB
/
deploy.yml
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: R
on: [push, pull_request]
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-22.04
env:
cache-version: 8
steps:
- uses: actions/checkout@v3
- name: Set up libraries for Ubuntu
run: |
sudo apt-get update
sudo apt-get install -y libsodium-dev libharfbuzz-dev libfribidi-dev libcurl4-openssl-dev texlive-latex-base texlive-fonts-extra pandoc libmagick++-dev libhdf5-dev
- name: Set up R 4.0
uses: r-lib/actions/setup-r@v2
with:
r-version: 4.0
- name: Get R and OS version
id: get-version
run: |
cat("::set-output name=os-version::", sessionInfo()$running, "\n", sep = "")
cat("::set-output name=r-version::", R.Version()$version.string, "\n", sep = "")
cat("::endgroup::\n")
shell: Rscript {0}
- name: Cache dependencies
id: cache-deps
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}/*
key: ${{ steps.get-version.outputs.os-version }}-${{ steps.get-version.outputs.r-version }}-${{ env.cache-version }}-deps
- name: Install dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: |
install.packages(c("remotes", "rcmdcheck", "BiocManager", "Seurat", "covr"))
BiocManager::install("BiocCheck")
remotes::install_github(c("RubD/Giotto", "mojaveazure/seurat-disk"))
remotes::install_deps(dependencies = TRUE)
shell: Rscript {0}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
- name: rcmdcheck
run: |
rcmdcheck::rcmdcheck(
error_on = "warning",
check_dir = "check"
)
shell: Rscript {0}
env:
_R_CHECK_FORCE_SUGGESTS_: false
- name: BiocCheck
run: |
BiocCheck::BiocCheck(
dir('check', 'tar.gz$', full.names = TRUE),
`no-check-R-ver` = TRUE,
`no-check-pkg-size` = TRUE,
`no-check-vignettes` = TRUE
)
shell: Rscript {0}
env:
_R_CHECK_FORCE_SUGGESTS_: false
- name: Run covr
run: |
covr::package_coverage()
shell: Rscript {0}
- name: Downgrade pkgdown
run: |
remotes::install_version("pkgdown", "2.0.3")
shell: Rscript {0}
- name: Build docs
run: |
Rscript -e 'pkgdown::build_site(new_process = FALSE)'
touch docs/.nojekyll
- uses: actions/upload-pages-artifact@v1
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
path: ./docs
deploy:
runs-on: ubuntu-22.04
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
id: deployment
uses: actions/deploy-pages@v1