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

ci: add workflow to deploy pkgdown site #163

Merged
merged 5 commits into from
Dec 20, 2024
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
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
inst/WORDLIST
Untitled\.R
\_pkgdown\.yml
^pkgdown$
yspec\.Rcheck
CONTRIBUTING.md
^spec.*\.pdf$
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,17 @@ jobs:
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
extra-packages: |
any::pkgdown
any::rcmdcheck
upgrade: 'TRUE'
- name: Install pdflatex
shell: bash
run: sudo apt-get install texlive-latex-base texlive-fonts-extra
- uses: r-lib/actions/check-r-package@v2
- name: Check pkgdown
shell: Rscript {0}
run: pkgdown::check_pkgdown()
release:
if: github.ref_type == 'tag'
name: Upload release
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/site.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Deploy site
on:
push:
branches:
- scratch/deploy-site
tags:
- '[0-9]+.[0-9]+.[0-9]+'
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
# Fetch tags for more informative git-describe output.
fetch-depth: 0
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
with:
r-version: release
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
with:
# The latest pkgdown release (v2.1.1) is not compatible with the
# generated favicons. Install from GitHub to get fix in dd777ee8.
# This can be changed to any::pkgdown after that fix is released.
extra-packages: r-lib/pkgdown
- name: Install pdflatex
shell: bash
run: sudo apt-get install texlive-latex-base texlive-fonts-extra
- name: Build site
run: pkgdown::build_site_github_pages(dest_dir = "docs", install = TRUE)
shell: Rscript {0}
- uses: metrumresearchgroup/actions/subdir-to-gh-pages@v1
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Authors@R: c(
person("Metrum Research Group", role = "cph")
)
Maintainer: Kyle Baron <kyleb@metrumrg.com>
URL: https://github.com/metrumresearchgroup/yspec
URL: https://metrumresearchgroup.github.io/yspec, https://github.com/metrumresearchgroup/yspec
BugReports: https://github.com/metrumresearchgroup/yspec/issues
Description: Generate Define.pdf from yaml specification.
License: GPL (>=2)
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ knitr::opts_chunk$set(
)
```

# yspec
# yspec <a href="https://metrumresearchgroup.github.io/yspec"><img src="man/figures/logo.png" align="right" width="135px" alt="yspec website" /></a>

<!-- badges: start -->
<!-- badges: end -->
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->

# yspec
# yspec <a href="https://metrumresearchgroup.github.io/yspec"><img src="man/figures/logo.png" align="right" width="135px" alt="yspec website" /></a>

<!-- badges: start -->
<!-- badges: end -->
Expand Down
1 change: 1 addition & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
url: https://metrumresearchgroup.github.io/yspec
navbar:
components:
intro:
Expand Down
Binary file added man/figures/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/favicon-96x96.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/favicon.ico
Binary file not shown.
3 changes: 3 additions & 0 deletions pkgdown/favicon/favicon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions pkgdown/favicon/site.webmanifest
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "",
"short_name": "",
"icons": [
{
"src": "/web-app-manifest-192x192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "maskable"
},
{
"src": "/web-app-manifest-512x512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}
Binary file added pkgdown/favicon/web-app-manifest-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pkgdown/favicon/web-app-manifest-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading