-
Notifications
You must be signed in to change notification settings - Fork 6
59 lines (48 loc) · 1.26 KB
/
deploy.yml
File metadata and controls
59 lines (48 loc) · 1.26 KB
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
59
name: Build and Deploy
on:
push:
branches:
- master
permissions:
contents: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
r-version: 'release'
- name: Setup Pandoc
uses: r-lib/actions/setup-pandoc@v2
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true
- name: Install dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
packages: |
any::blogdown
- name: Update CV
run: |
mkdir -p static/cv/ygc
curl -o static/cv/ygc/index.html https://raw.githubusercontent.com/GuangchuangYu/cv/master/index.html
- name: Build site
run: |
blogdown::build_site()
shell: Rscript {0}
- name: Copy CNAME
run: cp CNAME public/
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
publish_branch: gh-pages