File tree Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change
1
+ on :
2
+ push :
3
+ branches : [main, master]
4
+ release :
5
+ types : [published]
6
+ workflow_dispatch : {}
7
+
8
+ name : demo-r-shinylive-app
9
+
10
+ jobs :
11
+ demo-website :
12
+ runs-on : ubuntu-latest
13
+ # Only restrict concurrency for non-PR jobs
14
+ concurrency :
15
+ group : r-shinylive-website-${{ github.event_name != 'pull_request' || github.run_id }}
16
+ permissions :
17
+ contents : read
18
+ pages : write
19
+ id-token : write
20
+ steps :
21
+ - name : " Check out repository"
22
+ uses : actions/checkout@v4
23
+
24
+ - name : " Setup R"
25
+ uses : r-lib/actions/setup-r@v2
26
+
27
+ # Pinned shinylive dependency
28
+ - name : " Setup R dependency for Shinylive App export"
29
+ uses : r-lib/actions/setup-r-dependencies@v2
30
+ with :
31
+ packages :
32
+ cran::shinylive@0.1.1
33
+
34
+ # Export the current working directory as the shiny app
35
+ - name : Create Shinylive App from working directory files
36
+ shell : Rscript {0}
37
+ run : |
38
+ shinylive::export(".", "_site")
39
+
40
+ # Upload a tar file that will work with GitHub Pages
41
+ # Make sure to set a retention day to avoid running into a cap
42
+ # This artifact shouldn't be required after deployment onto pages was a success.
43
+ - name : Upload Pages artifact
44
+ uses : actions/upload-pages-artifact@v2
45
+ with :
46
+ retention-days : 1
47
+
48
+ # Use an Action deploy to push the artifact onto GitHub Pages
49
+ # This requires the `Action` tab being structured to allow for deployment
50
+ # instead of using `docs/` or the `gh-pages` branch of the repository
51
+ - name : Deploy to GitHub Pages
52
+ id : deployment
53
+ uses : actions/deploy-pages@v2
You can’t perform that action at this time.
0 commit comments