-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (66 loc) · 1.83 KB
/
publish-website.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: Publish Shiny App
on:
push:
branches: [main, master]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
# Step 1: Check out the repository
- name: Check out repository
uses: actions/checkout@v4
# Step 2: Install system dependencies
- name: Install system dependencies (libarchive-dev and libcurl4-openssl-dev)
run: sudo apt-get update && sudo apt-get install -y libarchive-dev libcurl4-openssl-dev
# Step 3: Set up R
- name: Set up R
uses: r-lib/actions/setup-r@v2
# Step 4: Install Shinylive
# - name: Install Shinylive
# run: |
# Rscript -e 'install.packages("shinylive", repos = "https://cloud.r-project.org")'
- name: "Setup R dependencies"
uses: r-lib/actions/setup-r-dependencies@v2
with:
packages:
cran::[email protected]
any::shiny
any::DT
any::bslib
any::broom
any::ggplot2
any::base64enc
any::shinyjs
any::mgcv
any::RColorBrewer
any::tidyr
any::purrr
any::agricolae
any::drc
any::cowplot
any::MASS
any::Matrix
any::equatiomatic
any::openxlsx
any::car
any::httr
any::jose
any::openssl
# Step 5: Export Shiny app as a static website
- name: Export Shiny app
run: |
Rscript -e 'shinylive::export("./app", "_site")'
# Step 6: Upload artifact for deployment
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v2
with:
path: _site
retention-days: 1
# Step 7: Deploy to GitHub Pages
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v2