Skip to content

Commit 2fd5086

Browse files
authored
Merge pull request #5 from SpatLyu/dev
configure github actions
2 parents ef4681b + aef435e commit 2fd5086

7 files changed

Lines changed: 169 additions & 0 deletions

File tree

.Rbuildignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
^coupling\.Rproj$
22
^\.Rproj\.user$
3+
^\.github$
4+
^_pkgdown\.yml$
5+
^docs$
6+
^pkgdown$

.github/.gitignore

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

.github/workflows/R-CMD-check.yaml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
8+
name: R-CMD-check
9+
10+
permissions: read-all
11+
12+
jobs:
13+
R-CMD-check:
14+
runs-on: ${{ matrix.config.os }}
15+
16+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
17+
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
config:
22+
- {os: macos-latest, r: 'release'}
23+
- {os: windows-latest, r: 'release'}
24+
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
25+
- {os: ubuntu-latest, r: 'release'}
26+
- {os: ubuntu-latest, r: 'oldrel-1'}
27+
28+
env:
29+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
30+
R_KEEP_PKG_SOURCE: yes
31+
32+
steps:
33+
- uses: actions/checkout@v6
34+
35+
- uses: r-lib/actions/setup-pandoc@v2
36+
37+
- uses: r-lib/actions/setup-r@v2
38+
with:
39+
r-version: ${{ matrix.config.r }}
40+
http-user-agent: ${{ matrix.config.http-user-agent }}
41+
42+
- uses: r-lib/actions/setup-r-dependencies@v2
43+
with:
44+
extra-packages: any::rcmdcheck
45+
needs: check
46+
47+
- uses: r-lib/actions/check-r-package@v2
48+
with:
49+
upload-snapshots: true
50+
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'

.github/workflows/pkgdown.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
release:
8+
types: [published]
9+
workflow_dispatch:
10+
11+
name: pkgdown
12+
13+
permissions: read-all
14+
15+
jobs:
16+
pkgdown:
17+
runs-on: ubuntu-latest
18+
# Only restrict concurrency for non-PR jobs
19+
concurrency:
20+
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
21+
env:
22+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
23+
permissions:
24+
contents: write
25+
steps:
26+
- uses: actions/checkout@v6
27+
28+
- uses: r-lib/actions/setup-pandoc@v2
29+
30+
- uses: r-lib/actions/setup-r@v2
31+
32+
- uses: r-lib/actions/setup-r-dependencies@v2
33+
with:
34+
extra-packages: any::pkgdown, local::.
35+
needs: website
36+
37+
- name: Build site
38+
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
39+
shell: Rscript {0}
40+
41+
- name: Deploy to GitHub pages 🚀
42+
if: github.event_name != 'pull_request'
43+
uses: JamesIves/github-pages-deploy-action@d92aa235d04922e8f08b40ce78cc5442fcfbfa2f # v4.8.0
44+
with:
45+
clean: false
46+
branch: gh-pages
47+
folder: docs

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
.httr-oauth
55
.DS_Store
66
.quarto
7+
docs

_pkgdown.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
url: https://stscl.github.io/coupling/
2+
template:
3+
bootstrap: 5
4+
math-rendering: mathjax
5+
light-switch: true
6+
7+
navbar:
8+
structure:
9+
right: [search, github]
10+
left: [reference, articles, news]
11+
bg: custom
12+
components:
13+
articles:
14+
# text: Vignettes
15+
# menu:
16+
# - text: Coupling Coordination Degree Models
17+
# href: articles/ccd.html
18+
19+
home:
20+
title: |
21+
ccd | Coupling Coordination Analysis
22+
authors:
23+
Wenbo Lyu:
24+
href: https://spatlyu.github.io/
25+
26+
reference:
27+
28+
- title: Coupling Coordination Analysis
29+
30+
- subtitle: coupling coordination degree
31+
contents:
32+
- ccd

pkgdown/extra.css

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
@import url('https://fonts.googleapis.com/css?family=Raleway|Ubuntu+Mono');
2+
3+
body{
4+
font-family: 'Raleway', sans-serif;
5+
}
6+
7+
code{
8+
font-family: 'Ubuntu Mono', monospace;
9+
}
10+
11+
.navbar-brand.me-2 {
12+
color: #a19586;
13+
}
14+
15+
h1,h2,h3 {
16+
font-weight: bold;
17+
color: #00001c;
18+
}
19+
20+
a, code a {
21+
color: #458f47;
22+
}
23+
24+
a:hover, code a:hover {
25+
color: #2a68a1;
26+
}
27+
28+
a:not([href]) {
29+
color: inherit;
30+
}
31+
32+
a:not([href]):hover {
33+
color: inherit;
34+
}

0 commit comments

Comments
 (0)