Skip to content

Commit

Permalink
update workflows and add linter
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroelfs committed Oct 29, 2023
1 parent 9ebecf8 commit 3480d2e
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 11 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/lint-project.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: lint-project

on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]

jobs:
lint-project:
runs-on: ubuntu-latest
steps:
- name: 🛎 Check out repo
uses: actions/checkout@v3
with:
submodules: recursive

- name: 🏗️ Setup R
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- name: 🛠️ Install lintr
run: install.packages("lintr")
shell: Rscript {0}

- name: ✨ Lint root directory
run: lintr::lint_dir()
shell: Rscript {0}
env:
LINTR_ERROR_ON_LINT: true
19 changes: 8 additions & 11 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,34 @@ name: Test build
on:
push:
branches:
- update-theme
- dev
pull_request:
branches:
- dev

jobs:
build:

runs-on: ubuntu-latest

env:
HUGO_VERSION: 0.116.1

steps:
- name: 🛎 Check out repo
uses: actions/checkout@v3
with:
ref: update-theme
fetch-depth: 1
submodules: recursive

- name: Use Node.js
uses: actions/setup-node@master
with:
node-version: 10.x

- run: npm i -g postcss postcss-cli autoprefixer

- name: 🤵 Install Hugo
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: 🧹 Clean site
run: |
if [ -d "public" ]; then
rm -rf public/*
fi
- name: 🍳 Build site
run: |
hugo --gc --minify

0 comments on commit 3480d2e

Please sign in to comment.