-
-
Notifications
You must be signed in to change notification settings - Fork 1
29 lines (29 loc) · 1.07 KB
/
main.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
on:
push:
branches:
main
name: Render
jobs:
bookdown:
name: Render-Book
runs-on: ubuntu-latest
container: geocompr/geocompr:suggests
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Render Book
run: |
Rscript -e 'install.packages("remotes")'
Rscript -e 'remotes::install_github("geocompx/geocompkg", dependencies = TRUE, force = TRUE)'
#Rscript -e 'install.packages("geocompkg", repos = c("https://geocompr.r-universe.dev", "https://cloud.r-project.org"), dependencies = TRUE, force = TRUE)' Rscript -e 'bookdown::render_book("index.Rmd")'
cp -fvr _redirects _book/
cp -fvr .htaccess _book/
#cp -fvr es.html fr.html solutions.html htaccess.txt _book/
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_book
publish_branch: gh-pages
commit_message: 'Deploy commit: ${{ github.event.head_commit.message }}'