-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (60 loc) · 1.85 KB
/
publish.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
on:
pull_request:
push:
branches: main
name: Publish
jobs:
build-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up specific version of Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install R
uses: r-lib/actions/setup-r@v2
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Make sure data is available
run: |
AWS_EC2_METADATA_DISABLED=true \
aws s3 cp \
--no-sign-request \
s3://openproblems-bio/public/neurips-2023-competition/sc_counts_reannotated_with_counts.h5ad \
book/usecase/data/sc_counts_reannotated_with_counts.h5ad
# attempt with renv
- name: Set up renv
uses: r-lib/actions/setup-renv@v2
- name: Cache certain directories to speed up build
uses: actions/cache@v2
with:
path: |
book/usecase/data
key: quarto_cache_${{ github.ref_name }}
restore-keys: |
quarto_cache_main
- name: Render book
run: |
Rscript -e "renv::restore()"
source renv/python/virtualenvs/renv-python-3.12/bin/activate
quarto render
- name: Deploy 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: _book
branch: gh-pages
force: false
clean-exclude: pr-preview/
- name: Deploy preview
if: github.event_name == 'pull_request'
uses: rossjrw/pr-preview-action@v1
with:
source-dir: _book
preview-branch: gh-pages
umbrella-dir: pr-preview
action: auto