-
Notifications
You must be signed in to change notification settings - Fork 9
58 lines (49 loc) · 1.54 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
on:
workflow_dispatch:
schedule:
- cron: '0 20 * * *'
push:
branches: main
name: Quarto Publish
jobs:
build-deploy:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
container: rocker/geospatial:latest
permissions:
contents: write
steps:
- run: git config --system --add safe.directory '*'
- uses: actions/checkout@v4
with:
fetch-depth: 0
set-safe-directory: '*'
- name: Install packages
shell: Rscript {0}
run: source('install.R')
#- uses: quarto-dev/quarto-actions/setup@v2
# #with:
# version: 1.4.146
- name: Render
run: |
quarto render
- name: Update data
run: |
git config user.name github-actions
git config user.email [email protected]
git add data/saved_parameter_chain.csv
git add data/site_carbon_data.csv
git add data/PF_analysis_0.Rdata
git add data/PF_analysis_1.Rdata
git commit -a -m "update data" || echo "nothing to commit"
git push https://${GITHUB_PAT}:${GITHUB_PAT}@github.com/${GITHUB_REPOSITORY}
- name: Publish
run: |
git config user.name github-actions
git config user.email [email protected]
git checkout gh-pages
cp -r _book/* .
git add .
git commit -a -m "update pages" || echo "nothing to commit"
git push https://${GITHUB_PAT}:${GITHUB_PAT}@github.com/${GITHUB_REPOSITORY}