Skip to content

Commit

Permalink
drop make for easier templating
Browse files Browse the repository at this point in the history
  • Loading branch information
jangorecki committed Oct 19, 2024
1 parent 85377a5 commit c4d0dd5
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 5 deletions.
3 changes: 1 addition & 2 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
^\.github$
^_litedown\.yml$
^pkgup$
^doc$
^.pkgup$
^Makefile$
^public$
27 changes: 24 additions & 3 deletions .github/workflows/pkgup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,35 @@ jobs:
- name: build
run: |
echo "Revision:" $GITHUB_SHA >> ./DESCRIPTION
make build
R CMD build .
- name: check
run: |
make check
R CMD check --as-cran --no-manual $(ls -1t pkgup_*.tar.gz | head -n 1)
- name: doc
if: github.ref == 'refs/heads/master'
run: |
rm -rf .pkgup/doc
mkdir -p .pkgup/doc/vignettes
rsync -r --exclude 'doc' --exclude 'repo' .pkgup/* .pkgup/doc/
cp -r vignettes/* .pkgup/doc/vignettes/
R CMD INSTALL $(ls -1t pkgup_*.tar.gz | head -n 1)
Rscript -e 'litedown::fuse_site(".pkgup/doc")'
#ls -aR .pkgup/doc
- name: repo
if: github.ref == 'refs/heads/master'
run: |
rm -rf .pkgup/repo
mkdir -p .pkgup/repo/src/contrib
mv "$(ls -1t pkgup_*.tar.gz | head -n 1)" .pkgup/repo/src/contrib
Rscript -e 'tools::write_PACKAGES(".pkgup/repo/src/contrib", fields="Revision")'
#ls -aR .pkgup/repo
- name: public
if: github.ref == 'refs/heads/master'
run: |
make public
mkdir -p public
cp -r .pkgup/repo/* public
rsync -ravz --include '*/' --include='*.html' --exclude='*' .pkgup/doc/ public/
#ls -aR public
- name: upload
if: github.ref == 'refs/heads/master'
uses: actions/upload-pages-artifact@v1
Expand Down
1 change: 1 addition & 0 deletions vignettes/howto.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ vignette: >
```sh
cp pkgup/.github/workflows/pkgup.yaml yourpkg/.github/workflows/pkgup.yaml
sed -i 's|pkgup|yourpkg|g' yourpkg/.github/workflows/pkgup.yaml
cp -r .pkgup .
```

If needed, add OS dependencies chunk in `yourpkg/.github/workflows/pkgup.yaml`
Expand Down

0 comments on commit c4d0dd5

Please sign in to comment.