Skip to content

Commit

Permalink
add automatic deployment of docs to gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
gorgitko committed Dec 2, 2023
1 parent c06532f commit 358cd34
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/docker-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,30 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=min
- name: Remove devel mode from _pkgdown.yml
if: github.event_name == 'release'
run: |
docker exec -w /home/rstudio/scdrake_source scdrake_test \
'sed -i "/development:/d" _pkgdown.yml; sed -i "/mode: devel/d" _pkgdown.yml'
- name: Build pkgdown site
if: github.event_name != 'pull_request'
run: |
docker exec -w /home/rstudio/scdrake_source scdrake_test \
'Rscript -e "rmarkdown::render('README.Rmd'); pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)"'
- name: Deploy to GitHub pages (stable docs)
if: github.event_name == 'release'
uses: JamesIves/[email protected]
with:
clean: false
branch: gh-pages
folder: docs
- name: Deploy to GitHub pages (devel docs)
if: github.event_name == 'push'
uses: JamesIves/[email protected]
with:
clean: false
branch: gh-pages
folder: docs/dev
- name: Rollback release
if: github.event_name == 'release' && failure()
uses: author/action-rollback@stable
Expand Down
8 changes: 6 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ knitr::opts_chunk$set(
# scdrake

[![NEWS: updates](https://img.shields.io/badge/NEWS-updates-informational)](NEWS.md)
[![Documentation and vignettes](https://img.shields.io/badge/Documentation%20&%20vignettes-bioinfocz.github.io/scdrake-informational)](https://bioinfocz.github.io/scdrake)
[![Documentation and vignettes (stable version)](https://img.shields.io/badge/Documentation%20&%20vignettes-bioinfocz.github.io/scdrake-informational)](https://bioinfocz.github.io/scdrake)
[![Documentation and vignettes (devel version)](https://img.shields.io/badge/Documentation%20&%20vignettes-bioinfocz.github.io/scdrake-informational)](https://bioinfocz.github.io/scdrake/dev)
[![Overview and outputs](https://img.shields.io/badge/Overview%20&%20outputs-vignette("pipeline_overview")-informational)](https://bioinfocz.github.io/scdrake/articles/pipeline_overview.html)
[![Pipeline diagram](https://img.shields.io/badge/Pipeline%20diagram-Show-informational)](https://github.com/bioinfocz/scdrake/blob/main/diagrams/README.md)
![License](https://img.shields.io/github/license/bioinfocz/scdrake)
Expand Down Expand Up @@ -307,7 +308,10 @@ Then you can go through the [Get Started vignette](https://bioinfocz.github.io/s

## Vignettes and other readings

See <https://bioinfocz.github.io/scdrake> for a documentation website where links to vignettes below become real :-)
See <https://bioinfocz.github.io/scdrake> for a documentation website of the latest stable version
(`r LATEST_STABLE_VERSION`) where links to vignettes below become real :-)

See <https://bioinfocz.github.io/scdrake/dev> for a documentation website of the current development version.

```{r, child = "vignettes/_vignette_signpost.Rmd"}
```
Expand Down
2 changes: 2 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
development:
mode: devel
template:
package: preferably
bootstrap: 5
Expand Down

0 comments on commit 358cd34

Please sign in to comment.