Skip to content

Commit

Permalink
fixup ci
Browse files Browse the repository at this point in the history
  • Loading branch information
mhils committed Jul 30, 2024
1 parent 627d826 commit e0d2728
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 39 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,23 @@ name: CI

on: [push, pull_request]

permissions:
contents: read

jobs:
build:
uses: mhils/workflows/.github/workflows/gh-pages-hugo.yml@v8
with:
deploy: false
working-directory: src
permissions:
contents: read
id-token: write
pages: write
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: |
wget https://github.com/gohugoio/hugo/releases/download/v0.87.0/hugo_extended_0.87.0_Linux-64bit.deb
sudo dpkg -i hugo*.deb
- run: |
wget https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64
sudo mv jq-linux64 /usr/local/bin/jq
Expand Down
35 changes: 0 additions & 35 deletions build.sh

This file was deleted.

27 changes: 26 additions & 1 deletion ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,29 @@ set -o pipefail
set -o nounset
# set -o xtrace

./build.sh
cd src

# check for valid JSON
cat assets/data/publications.json | jq empty

# check for existing publication types
allowed_types=$(cat <<-MOT
blog post
media
research
talk
MOT
)
types=$(cat assets/data/publications.json | jq -r '.[].type' | sort | uniq)

if [[ ${types} != ${allowed_types} ]]; then
echo "Found invalid publication type!"
exit 1
fi

conference_missing=$(cat assets/data/publications.json | jq '.[] | select(.type =="research") | select(.conference == null)')
if [ -n "$conference_missing" ]; then
echo "Research artifact without conference!"
echo "$conference_missing"
exit 1
fi

0 comments on commit e0d2728

Please sign in to comment.