-
Notifications
You must be signed in to change notification settings - Fork 5
46 lines (37 loc) · 1.18 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
36
37
38
39
40
41
42
43
44
45
46
on:
workflow_dispatch:
push:
branches:
main
schedule:
- cron: '30 12 * * 2'
name: Render-Book-from-main
jobs:
bookdown:
name: Render-Book
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: quarto-dev/quarto-actions/setup@v2
with:
version: 1.1.107
- 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/contributing-guidance'
run: |
cp ghpagescname _book/CNAME
cp -r favicon/ _book/
cp images/logo.png _book/logo.png
cd _book
git config --global user.email ${{secrets.EMAIL}}
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