-
Notifications
You must be signed in to change notification settings - Fork 4
35 lines (32 loc) · 1.04 KB
/
main.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
on:
push:
branches:
main
name: Render-Book-from-main
jobs:
quarto:
name: Render-Book
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: quarto-dev/quarto-actions/setup@v2
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: local::.
- name: Render book
run: Rscript -e 'quarto::quarto_render()'
- name: Commit results
if: github.repository == 'ropensci-org/blog-guidance'
run: |
cp ghpagescname _book/CNAME
cp -r favicon/ _book/
cp images/logo.png _book/logo.png
cd _book
git config --global user.email "[email protected]"
git config --global user.name "gh-pages committer"
git init
git add .
git commit -m 'update book'
git push https://${{github.actor}}:${{secrets.GITHUB_TOKEN}}@github.com/${{github.repository}}.git HEAD:gh-pages --force