-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (41 loc) · 1.27 KB
/
publish-cloudflare-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
46
47
48
49
on:
workflow_dispatch:
push:
branches: cf-pages
name: Publish Quarto to Cloudflare Plages
jobs:
build-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
deployments: write
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
version: pre-release
# install libcurl, needed for curl R package
# libfribidi-dev libharfbuzz-dev for textshaping
# libxslt1-dev for xslt
- name: Install R package deps
run: |
sudo apt-get update
sudo apt-get install libcurl4-openssl-dev libfribidi-dev libharfbuzz-dev libxslt1-dev
- name: Install R
uses: r-lib/actions/setup-r@v2
with:
r-version: "4.4.0"
- name: Install R Dependencies
uses: r-lib/actions/setup-renv@v2
with:
cache-version: 1
- name: Render book
run: Rscript -e 'babelquarto::render_website()'
- name: Deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy _site --project-name=joelnitta-home