forked from RConsortium/submissions-pilot4-webR
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (56 loc) · 1.73 KB
/
publish-adrg.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
on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'adrg/_adrg.qmd'
name: Quarto Publish ADRG
jobs:
build-deploy:
runs-on: ubuntu-latest
permissions:
contents: 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 font dependencies
id: install-fonts
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: fonts-dejavu-core fonts-dejavu-extra
version: 1.0
- 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: Publish ADRG HTML version to Quarto Pub
uses: quarto-dev/quarto-actions/publish@v2
with:
target: quarto-pub
path: adrg/adrg-quarto-html.qmd
QUARTO_PUB_AUTH_TOKEN: ${{ secrets.QUARTO_PUB_AUTH_TOKEN }}
- 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 ADRG PDF version to Linode Object Storage
run: |
s3cmd put adrg/adrg-quarto-pdf.pdf --mime-type 'application/pdf' --acl-public s3://rsubmission-draft/adrg-quarto-pdf.pdf