Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup netlify workflow; fix #41 #42

Merged
merged 1 commit into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/netlify.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
on:
pull_request:
branches: [main, master]

name: pkgdown-pr

jobs:
netlify:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-tinytex@v2

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::pkgdown, local::.
needs: website

- name: Install package
run: R CMD INSTALL .

- name: Create website
run: |
pkgdown::build_site()
shell: Rscript {0}

- name: Create index file
run: |
echo '<!DOCTYPE html><html><head><meta http-equiv="refresh" content="0;URL=/dev/index.html" /> <script language="javascript"> window.location.replace('/dev/index.html')</script></head></html>' > ./docs/index.html

- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
publish-dir: './docs'
production-branch: main
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message:
'Deploy from GHA: ${{ github.event.pull_request.title || github.event.head_commit.message }} (${{ github.sha }})'
# these default to 'true'
enable-commit-comment: false
enable-github-deployment: false
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ Encoding: UTF-8
Language: en-GB
LazyData: true
RoxygenNote: 7.3.2
Roxygeon: list(markdown = TRUE)
Roxygen: list(markdown = TRUE)
URL: https://rapidsurveys.io/okapi/,https://github.com/rapidsurveys/okapi
BugReports: https://github.com/rapidsurveys/okapi/issues
4 changes: 3 additions & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ Currently, `{okapi}` provides functions to interface with [ONA](https://getodk.o
```{r install, echo = TRUE, eval = FALSE}
install.packages(
"okapi",
repos = c('https://rapidsurveys.r-universe.dev', 'https://cloud.r-project.org')
repos = c(
'https://rapidsurveys.r-universe.dev', 'https://cloud.r-project.org'
)
)
```

Expand Down
2 changes: 1 addition & 1 deletion inst/CITATION
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ bibentry(
title = "okapi: Open Data Kit (ODK)-based Computer-assisted Personal Interview (CAPI) Tools",
author = person("Ernest Guevarra"),
year = "2024",
note = "R package version 0.0.0.9000",
note = "R package version 0.1.0.9000",
url = "https://rapidsurveys.io/okapi/",
doi = "10.5281/zenodo.206914853",
)
2 changes: 1 addition & 1 deletion man/ona_project_register.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/ona_project_share.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions pkgdown/_pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ navbar:
type: light
structure:
left: [home, intro, reference, articles, news]
right: [search, mastodon, github]
right: [search, mastodon, linkedin, github]

components:
# articles:
Expand All @@ -28,8 +28,12 @@ navbar:
# href: articles/haemoglobinaemia.html
mastodon:
icon: "fab fa-mastodon fa-lg"
href: https://fosstodon.org/@katilingban
aria-label: Mastodon
href: https://fosstodon.org/@katilingban
linkedin:
icon: "fab fa-linkedin fa-lg"
aria-label: LinkedIn
href: https://www.linkedin.com/company/katilingban

home:
links:
Expand Down
Loading