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

vignette cache, pkgdwn & bioconductor branch actions #81

Closed
wants to merge 20 commits into from
Closed
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
29 changes: 29 additions & 0 deletions .github/copy_to_branch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Designate desired directories and files
SRC_FOLDER_PATHS=(data-raw man R tests vignettes)
SRC_FILE_PATHS=(DESCRIPTION LICENSE NAMESPACE NEWS.md README.md inst/CITATION)

# Get files from directories
FILES=$(find "${SRC_FOLDER_PATHS[@]}" -type f)

# Add indicated individual files
for F in "${SRC_FILE_PATHS[@]}"
do
FILES+=" ${F}"
done

echo "${FILES[@]}"

# Pass these to github:
git config --global user.name 'GitHub Action'
git config --global user.email '[email protected]'
# Fetch branches
git fetch
# Checkout target branch
git checkout $TARGET_BRANCH
# Copy files in $FILES list from workflow test branch
git checkout krishnan_workflow_test -- $FILES
# Commit to the repository (ignore if no changes)
git add -A
git diff-index --quiet HEAD || git commit -am "update files"
# Push to remote branch
git push origin $TARGET_BRANCH
20 changes: 19 additions & 1 deletion .github/workflows/bioc_branch.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,22 @@
name: Update Bioconductor package files

on:
workflow_dispatch:
push:
branches: [main, master]
pull_request:
branches: [main, master]
release:
types: [published]
workflow_dispatch:

jobs:
copy:
name: Copy files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: copy
env:
TARGET_BRANCH: 'krishnan_bioc_test'
run: .github/copy_to_branch.sh
shell: bash
44 changes: 42 additions & 2 deletions .github/workflows/document.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,43 @@
name: documentation-update
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
workflow_dispatch:
push:
paths: ["R/**"]
workflow_dispatch:

name: documentation-update

jobs:
document:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0

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

- name: Install dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::roxygen2
needs: roxygen2

- name: Document
run: roxygen2::roxygenise()
shell: Rscript {0}

- name: Commit and push changes
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "[email protected]"
git add man/\* NAMESPACE DESCRIPTION
git commit -m "Update documentation" || echo "No changes to commit"
git pull --ff-only
git push origin
49 changes: 47 additions & 2 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,48 @@
name: pkgdown-update
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
workflow_dispatch:
push:
branches: [main, master]
pull_request:
branches: [main, master]
release:
types: [published]
workflow_dispatch:

name: pkgdown-update

jobs:
pkgdown:
runs-on: ubuntu-latest
# Only restrict concurrency for non-PR jobs
concurrency:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v3

- 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
needs: website

- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = TRUE)
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/[email protected]
with:
clean: false
branch: gh-pages
folder: docs
5 changes: 3 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Imports:
License: GPL-3 | file LICENSE
Encoding: UTF-8
LazyData: false
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
biocViews:
SystemsBiology,
SingleCell,
Expand All @@ -43,7 +43,8 @@ Suggests:
rmarkdown,
Seurat,
testthat,
formatR
formatR,
BiocFileCache
VignetteBuilder: knitr
Language: en-US
Roxygen: list(markdown = TRUE)
1 change: 1 addition & 0 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -247,3 +247,4 @@ dom_network_items <- function(dom, clusters = NULL, return = NULL) {
return(list_out[[return]])
}
}

156 changes: 0 additions & 156 deletions old.README.md

This file was deleted.

39 changes: 0 additions & 39 deletions scenic_bash/hgnc_scenic.sh

This file was deleted.

Loading
Loading