Skip to content

build website

build website #75

Workflow file for this run

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