-
Notifications
You must be signed in to change notification settings - Fork 12
85 lines (75 loc) · 2.92 KB
/
deploy.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: build_and_deploy
on:
schedule:
- cron: '0 03 * * *'
push:
branches:
- master
jobs:
blogdown:
name: build_and_push_to_gh_pages
runs-on: ubuntu-20.04
env:
GOOGLESHEETS4_PASSWORD: ${{ secrets.GOOGLESHEETS4_PASSWORD }}
RSPM: https://packagemanager.posit.co/cran/__linux__/bionic/2024-06-01/
REPO_PIN_PAT: ${{ secrets.REPO_PIN_PAT }}
steps:
- uses: r-lib/actions/setup-r@v2
with:
r-version: '4.1.0'
extra-packages: |
any::rcmdcheck
any::XML
- uses: r-lib/actions/setup-pandoc@v1
- name: Checkout
uses: actions/[email protected]
- name: Install pak and query dependencies
run: |
install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/")
saveRDS(pak::pkg_deps("local::.", dependencies = TRUE), ".github/r-depends.rds")
shell: Rscript {0}
- name: Cache R packages
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ubuntu-18.04-${{ steps.install-r.outputs.installed-r-version }}-1-${{ hashFiles('.github/r-depends.rds') }}
restore-keys: ubuntu-18.04-${{ steps.install-r.outputs.installed-r-version }}-1-
- name: Install system dependencies
if: runner.os == 'Linux'
run: |
pak::local_system_requirements(execute = TRUE)
pak::pkg_system_requirements("pkgdown", execute = TRUE)
shell: Rscript {0}
- name: Install dependencies
run: |
pak::local_install_dev_deps(upgrade = TRUE)
shell: Rscript {0}
- name: Install Hugo
run: Rscript -e 'blogdown::install_hugo(extended = TRUE, version = "0.82.0")'
#- name: Get themes
# run: git submodule update --remote
#- name: Look at files
# run: Rscript -e 'dir()'
- name: Build team # run locally
run: Rscript -e 'source("build_scripts/build_team.R")'
- name: Build proceedings
run: Rscript -e 'source("build_scripts/build_proceedings.R")'
- name: Build schedules
run: Rscript -e 'source("build_scripts/build_schedules.R")'
- name: Build profile images # run locally
run: Rscript -e 'source("build_scripts/build_profile_image.R")'
- name: Build redirect
run: Rscript -e 'source("build_scripts/build_redirects.R")'
- name: Build workshops
run: Rscript -e 'source("build_scripts/build_workshops.R")'
- name: Run hugo_build()
run: Rscript -e 'blogdown::hugo_build(local = FALSE)'
- name: Look at files post run
run: Rscript -e 'list.files(recursive = TRUE)'
- name: Look at files in public
run: Rscript -e 'dir("public")'
- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
branch: gh-pages # The branch the action should deploy to.
folder: public # The folder the action should deploy.