-
Notifications
You must be signed in to change notification settings - Fork 10
48 lines (39 loc) · 1.28 KB
/
buildWebsite.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
name: build website
# Trigger the workflow when the validation action finished
on:
workflow_run:
workflows: ["module library validation (nassa-hs)"]
types:
- completed
branches:
- "main"
jobs:
buildWebsite:
# only run if the validation was successful and if this was an event on the main branch
if: ${{ github.event.workflow_run.conclusion == 'success' && github.ref == 'refs/heads/main' }}
name: build repo website
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v2
- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
# Use the public version of RStudio package manager to serve binaries for Linux and Windows
use-public-rspm: true
- name: Install Pandoc
uses: r-lib/actions/setup-pandoc@v2
- name: Install R depedencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 1
working-directory: website_generator
- name: Build website
run: |
cd website_generator
Rscript generate_source.R
- name: Deploy website
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: website_generator/website_source/_site