forked from RConsortium/submissions-pilot4-webR
-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (78 loc) · 2.63 KB
/
publish-ectd-bundle.yaml
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
on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'app/**'
- 'utils.R'
- 'renv.lock'
- 'ectd_readme/README.qmd'
name: Publish ECTD bundle
jobs:
build-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
id-token: write
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
tinytex: true
- name: Install R
uses: r-lib/actions/setup-r@v2
with:
r-version: '4.4.1'
- name: Install R Dependencies
uses: r-lib/actions/setup-renv@v2
with:
cache-version: 1
- name: Render ADRG PDF (custom)
env:
QUARTO_PRINT_STACK: true
run: |
quarto render adrg/adrg-quarto-pdf.qmd --to pdf
shell: bash
- name: Render ECTD README (custom)
env:
QUARTO_PRINT_STACK: true
run: |
quarto render ectd_readme/README.qmd --to gfm
- name: Render cover letter (custom)
env:
QUARTO PRINT STACK: true
run: |
quarto render cover-letter/cover-letter.qmd
- name: Compile ECTD Bundle (custom)
run: |
source("utils.R"); create_app_bundle(); create_ectd_bundle()
shell: Rscript {0}
- name: Set up object storage s3cmd cli tool
uses: s3-actions/s3cmd@v1.6.1
with:
provider: linode
region: 'us-east-1'
access_key: ${{ secrets.S3_ACCESS_KEY }}
secret_key: ${{ secrets.S3_SECRET_KEY }}
- name: Publish ECTD App bundle to Linode Object Storage
run: |
s3cmd put ectd_bundle/r4app.zip --mime-type 'application/zip' --acl-public s3://rsubmission-draft/r4app.zip
- name: Check out ECTD bundle destination repo
uses: actions/checkout@v4
with:
repository: RConsortium/submissions-pilot4-webR-to-fda
path: ./submissions-pilot4-webR-to-fda
token: ${{ secrets.API_TOKEN_GITHUB }}
- name: Copy ECTD bundle
run: bash ./.github/scripts/copy-ectd-bundle.sh
env:
DESTINATION_DIR: submissions-pilot4-webR-to-fda/m5/datasets/rconsortiumpilot4/analysis/adam/programs
ADRG_DESTINATION_DIR: submissions-pilot4-webR-to-fda/m5/datasets/rconsortiumpilot4/analysis/adam/datasets
README_DESTINATION_DIR: submissions-pilot4-webR-to-fda
LETTER_DESTINATION_DIR: submissions-pilot4-webR-to-fda/m1/us
- name: Push ECTD bundle repository
run: bash ./.github/scripts/push-ectd-bundle.sh