-
Notifications
You must be signed in to change notification settings - Fork 0
100 lines (85 loc) · 2.67 KB
/
deploy.yml
File metadata and controls
100 lines (85 loc) · 2.67 KB
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Deploy Courses to GitHub Pages
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Quarto
uses: quarto-dev/quarto-actions/setup@v2
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tinytex: true
- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
libfreetype6-dev \
libpng-dev \
zlib1g-dev \
libglpk-dev \
libgsl-dev \
libxml2-dev \
libssl-dev \
libcurl4-openssl-dev \
libbz2-dev \
liblzma-dev \
python3
- name: Install R dependencies via pak
run: |
# 所有需要安装的 R 包(CRAN + Bioconductor)
pkgs <- c(
"rmarkdown", "knitr", "showtext", "tidyverse", "DT",
"reticulate", "pheatmap", "RColorBrewer", "sigminer",
"DESeq2", "edgeR", "clusterProfiler", "enrichplot",
"org.Hs.eg.db", "GenomicRanges", "maftools",
"VariantAnnotation", "TCGAbiolinks"
)
# 安装 pak(自动处理二进制缓存和并行下载)
install.packages("pak", repos = sprintf(
"https://r-lib.github.io/p/pak/stable/%s/%s/%s",
.Platform$pkgType, R.Version()$os, R.Version()$arch
))
# 统一安装所有 R 包(CRAN + Bioconductor)
# 系统依赖已在上一阶段手动安装完备
# pak 自动处理依赖解析、并行下载和二进制缓存
pak::pak(pkgs)
shell: Rscript {0}
- name: Render website
run: |
echo "Rendering website..."
bash build.sh
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./_site
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4