Browse code

- First try of pkgdown and website-only articles.

Dario Strbenac authored on 03/11/2022 01:20:32
Showing 7 changed files

... ...
@@ -1,2 +1,7 @@
1
-^.*\.Rproj$
2
-^\.Rproj\.user$
1
+^.*\.Rproj$
2
+^\.Rproj\.user$
3
+^_pkgdown\.yml$
4
+^docs$
5
+^pkgdown$
6
+vignettes/test.Rmd
7
+^\.github$
3 8
new file mode 100644
... ...
@@ -0,0 +1 @@
1
+*.html
0 2
new file mode 100644
... ...
@@ -0,0 +1,46 @@
1
+# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2
+# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3
+on:
4
+  push:
5
+    branches: [main, master]
6
+  pull_request:
7
+    branches: [main, master]
8
+  release:
9
+    types: [published]
10
+  workflow_dispatch:
11
+
12
+name: pkgdown
13
+
14
+jobs:
15
+  pkgdown:
16
+    runs-on: ubuntu-latest
17
+    # Only restrict concurrency for non-PR jobs
18
+    concurrency:
19
+      group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
20
+    env:
21
+      GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
22
+    steps:
23
+      - uses: actions/checkout@v3
24
+
25
+      - uses: r-lib/actions/setup-pandoc@v2
26
+
27
+      - uses: r-lib/actions/setup-r@v2
28
+        with:
29
+          use-public-rspm: true
30
+
31
+      - uses: r-lib/actions/setup-r-dependencies@v2
32
+        with:
33
+          extra-packages: any::pkgdown, local::.
34
+          needs: website
35
+
36
+      - name: Build site
37
+        run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
38
+        shell: Rscript {0}
39
+
40
+      - name: Deploy to GitHub pages 🚀
41
+        if: github.event_name != 'pull_request'
42
+        uses: JamesIves/github-pages-deploy-action@v4.4.1
43
+        with:
44
+          clean: false
45
+          branch: gh-pages
46
+          folder: docs
... ...
@@ -1,4 +1,5 @@
1
-.Rproj.user
2
-.Rhistory
3
-.RData
4
-.Ruserdata
1
+.Rproj.user
2
+.Rhistory
3
+.RData
4
+.Ruserdata
5
+docs
... ...
@@ -86,3 +86,4 @@ Collate:
86 86
     'simpleParams.R'
87 87
     'subtractFromLocation.R'
88 88
     'utilities.R'
89
+URL: https://sydneybiox.github.io/ClassifyR/
89 90
\ No newline at end of file
90 91
new file mode 100644
... ...
@@ -0,0 +1,4 @@
1
+url: https://sydneybiox.github.io/ClassifyR/
2
+template:
3
+  bootstrap: 5
4
+
0 5
new file mode 100755
... ...
@@ -0,0 +1,8 @@
1
+---
2
+title: "Test Article"
3
+author: Test Test <br>
4
+        The University of Sydney, Australia.
5
+output: BiocStyle::html_document
6
+---
7
+
8
+Hello.
0 9
\ No newline at end of file