pak does support packages in subdirectories in GitHub repos, the syntax is the same as for remotes, so you can use this with r-lib/actions and the new v2 tag:
cmu-delphi/covidcast/R-packages/evalcast
If you want to check from your R console:
❯ install.packages("pak", repos = "https://r-lib.github.io/p/pak/devel/")
❯ pak::pkg_deps("cmu-delphi/covidcast/R-packages/evalcast")
# A tibble: 115 × 32
ref type direct directpkg status package version license needscompilation
<chr> <chr> <lgl> <lgl> <chr> <chr> <chr> <chr> <lgl>
1 githu… gith… TRUE TRUE OK evalca… 0.3.0 MIT + … TRUE
2 MMWRw… stan… FALSE FALSE OK MMWRwe… 0.1.3 GPL (>… FALSE
3 Matrix stan… FALSE FALSE OK Matrix 1.4-0 GPL (>… FALSE
4 R6 stan… FALSE FALSE OK R6 2.5.1 MIT + … FALSE
5 RColo… stan… FALSE FALSE OK RColor… 1.1-2 Apache… FALSE
6 Rcpp stan… FALSE FALSE OK Rcpp 1.0.7 GPL (>… FALSE
7 arrow stan… FALSE FALSE OK arrow 6.0.1 Apache… FALSE
8 askpa… stan… FALSE FALSE OK askpass 1.1 MIT + … FALSE
9 asser… stan… FALSE FALSE OK assert… 0.2.1 GPL-3 FALSE
10 bit64 stan… FALSE FALSE OK bit64 4.0.5 GPL-2 … FALSE
# … with 105 more rows, and 23 more variables: priority <chr>, md5sum <chr>,
# sha256 <chr>, filesize <int>, built <chr>, platform <chr>, rversion <chr>,
# repotype <chr>, repodir <chr>, target <glue>, deps <list>, mirror <chr>,
# sources <list>, remote <list>, error <list>, metadata <list>,
# dep_types <list>, params <list>, sysreqs <chr>, cache_status <chr>,
# lib_status <chr>, old_version <chr>, new_version <chr>
It however does not support GitLab repos. If you need to refer to a GitLab repo, you can use the url:: remote type, e.g.
❯ pak::pkg_deps("url::https://gitlab.com/jimhester/covr/-/archive/master/covr-master.zip")
Docs: Package sources — pak_package_sources • pak