-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (36 loc) · 1.55 KB
/
Build_gh-pages.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
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples and adapted
on:
push:
branches: [main]
name: Build_gh-pages.yml #shown when action is run
jobs:
pkgdown:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} #to push results to gh-pages branch!
steps: #Series of steps that is executed sequencially: https://github.com/r-lib/actions/
- uses: actions/checkout@v4 # goes to gh-pages branch to work there
- name: Install libglpk40
run: sudo apt-get install -y libglpk40
- uses: r-lib/actions/setup-pandoc@v2 #installs pandoc
- uses: r-lib/actions/setup-r@v2 #installs R
with:
use-public-rspm: true
- name: Install fgsea & pkgdown
run: |
Rscript -e 'install.packages("remotes")'
Rscript -e 'remotes::install_github("ctlab/fgsea")' # see: https://github.com/ctlab/fgsea/issues/165
Rscript -e 'install.packages("pkgdown")'
- name: Install MetaProViz from GitHub by remotes
run: Rscript -e 'remotes::install_github("saezlab/MetaProViz")' #we install from GitHub as if we are a random user
- name: Build pkgdown site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}
- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
clean: false
branch: gh-pages
folder: docs