-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (91 loc) · 3.05 KB
/
pkgdown.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
96
97
98
99
100
101
102
103
104
105
name: pkgdown
on: push
permissions:
contents: write
jobs:
main:
name: Build and publish website
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install pandoc
uses: r-lib/actions/setup-pandoc@v2
- name: Install R
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
r-version: 'release'
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev libssl-dev libxml2-dev libgit2-dev
- name: Fix DESCRIPTION file
run: |
sed -i -e '$a\' DESCRIPTION
- name: Install remotes
run: |
install.packages("remotes")
shell: Rscript {0}
- name: Debug environment before dependency installation
run: |
echo "R version:"
R --version
echo "R library paths:"
Rscript -e ".libPaths()"
echo "System libraries:"
dpkg -l | grep -E 'libcurl4-openssl-dev|libssl-dev|libxml2-dev|libgit2-dev'
echo "Contents of DESCRIPTION file:"
cat DESCRIPTION
echo "Available disk space:"
df -h
echo "Installed packages:"
Rscript -e "installed.packages()[, c('Package', 'Version')]"
- name: Install R package dependencies (with debug)
run: |
options(warn = 2)
if (file.exists("renv.lock")) {
message("renv lockfile found, restoring environment...")
renv::restore()
} else {
message("No renv lockfile found, installing dependencies normally...")
remotes::install_deps(dependencies = TRUE, upgrade = "never")
}
remotes::install_github("dereckmezquita/kucoin")
remotes::install_cran(c("pkgdown", "rcmdcheck"))
shell: Rscript {0}
- name: Configure git
if: success()
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: List package contents
if: success()
run: |
ls -R
- name: Build package
if: success()
run: |
R CMD build . --no-build-vignettes
- name: Install and check package
if: success()
run: |
R CMD INSTALL --build .
R CMD check --no-manual --no-tests --no-examples --no-codoc --no-vignettes --no-build-vignettes *tar.gz
- name: Show check results
if: always()
run: |
find . -name "00check.log" -exec cat {} \;
find . -name "00install.out" -exec cat {} \;
- name: Show error logs
if: failure()
run: |
find . -name "*.Rout" -exec cat {} \;
find . -name "*.fail" -exec cat {} \;
- name: Deploy to branch
if: success()
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
shell: Rscript {0}
run: pkgdown::deploy_to_branch(branch = "bot/github-pages")