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 #46

Merged
merged 6 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
Expand Up @@ -15,3 +15,4 @@ test.R
WORDLIST
^\.github$
temp
^_pkgdown\.yml$
4 changes: 4 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,15 @@ jobs:
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
any::pkgdown
any::rcmdcheck
${{ matrix.config.pbkrtest_pkg }}
${{ matrix.config.matrix_pkg }}
upgrade: ${{ matrix.config.r == 'release' && 'TRUE' || 'FALSE' }}
- 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
31 changes: 31 additions & 0 deletions .github/workflows/site.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
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:
extra-packages: any::pkgdown
- 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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ test.R
.Rhistory
.RData
.Ruserdata
/docs
2 changes: 2 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Description: Plots are annotated with the name of the generating
License: GPL (>=2)
Language: en-US
Encoding: UTF-8
URL: https://metrumresearchgroup.github.io/mrggsave, https://github.com/metrumresearchgroup/mrggsave
BugReports: https://github.com/metrumresearchgroup/mrggsave/issues
Imports:
ggplot2 (>= 2.2.1),
grid,
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ https://github.com/metrumresearchgroup/mrggsave

## News

News can be found [here](news.md)
News can be found [here](https://metrumresearchgroup.github.io/mrggsave/news/)
5 changes: 5 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
url: https://metrumresearchgroup.github.io/mrggsave
navbar:
right:
- icon: fa-github fa-lg
href: https://github.com/metrumresearchgroup/mrggsave
146 changes: 0 additions & 146 deletions docs/404.html

This file was deleted.

145 changes: 0 additions & 145 deletions docs/articles/index.html

This file was deleted.

Loading
Loading