Skip to content

Commit

Permalink
Merge pull request #143 from nutriverse/fix/website-setup
Browse files Browse the repository at this point in the history
general website updates; fix #136; fix #141; fix #139; fix #142
  • Loading branch information
ernestguevarra authored Dec 21, 2024
2 parents e60bbee + 6a1ae70 commit 1549df1
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 12 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@
^vignettes/sample_size_files$
ˆvignettes/sample_size.html$
^CODE_OF_CONDUCT\.md$
^vignettes/\.quarto$
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/actions-netlify@v3.0
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 }}
1 change: 0 additions & 1 deletion .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Type: Package
Package: mwana
Title: An Efficient Workflow for Plausibility Checks and Prevalence Analysis of
Wasting in R
Version: 0.2.1
Version: 0.2.1.9000
Authors@R: c(
person("Tomás", "Zaba", , "tomas.zaba@outlook.com",
role = c("aut", "cre", "cph"),
Expand Down
17 changes: 7 additions & 10 deletions pkgdown/_pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,19 @@ development:

template:
bootstrap: 5
bootswatch: pulse
theme: breeze-light
ganalytics: G-94YZ36XGLH
ganalytics: "G-94YZ36XGLH"
bslib:
bootswatch: pulse
pkgdown-nav-height: 100px
success: "#004225"

navbar:
bg: success
type: light
type: dark
structure:
left: [home, intro, reference, articles, news]
right: [search, website, mastodon, github]
right: [search, mastodon, github]

components:
articles:
Expand All @@ -30,14 +31,10 @@ navbar:
href: articles/prevalence.html
- text: "IPC sample size requirements"
href: articles/ipc_amn_check.html
website:
icon: "fa globe fa-lg"
href: https://nutriverse.io
aria-label: View website
mastodon:
icon: "fab fa-mastodon fa-lg"
href: https://mastodon.social/@nutriverse
aria-label: Follow on Mastodon
href: https://fosstodon.org/@nutriverse
aria-label: Mastodon

home:
links:
Expand Down

0 comments on commit 1549df1

Please sign in to comment.